# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI="5" inherit eutils linux-info prefix systemd versionator DESCRIPTION='A high-level tool for configuring Netfilter' HOMEPAGE="http://www.shorewall.net/" LICENSE="GPL-2" SLOT="0" IUSE="doc +init +ipv4 ipv6 lite4 lite6" MY_PV=${PV/_rc/-RC} MY_PV=${MY_PV/_beta/-Beta} MY_P=${PN}-${MY_PV} MY_MAJOR_RELEASE_NUMBER=$(get_version_component_range 1-2) MY_MAJORMINOR_RELEASE_NUMBER=$(get_version_component_range 1-3) # shorewall MY_PN_IPV4=Shorewall MY_P_IPV4=${MY_PN_IPV4/#S/s}-${MY_PV} # shorewall6 MY_PN_IPV6=Shorewall6 MY_P_IPV6=${MY_PN_IPV6/#S/s}-${MY_PV} # shorewall-lite MY_PN_LITE4=Shorewall-lite MY_P_LITE4=${MY_PN_LITE4/#S/s}-${MY_PV} # shorewall6-lite MY_PN_LITE6=Shorewall6-lite MY_P_LITE6=${MY_PN_LITE6/#S/s}-${MY_PV} # shorewall-init MY_PN_INIT=Shorewall-init MY_P_INIT=${MY_PN_INIT/#S/s}-${MY_PV} # shorewall-core MY_PN_CORE=Shorewall-core MY_P_CORE=${MY_PN_CORE/#S/s}-${MY_PV} # shorewall-docs-html MY_PN_DOCS=Shorewall-docs-html MY_P_DOCS=${MY_PN_DOCS/#S/s}-${MY_PV} # Upstream URL schema: # Beta: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-Beta2/shorewall-4.6.4-Beta2.tar.bz2 # RC: $MIRROR/pub/shorewall/development/4.6/shorewall-4.6.4-RC1/shorewall-4.6.4-RC1.tar.bz2 # Release: $MIRROR/pub/shorewall/4.6/shorewall-4.6.3/shorewall-4.6.3.3.tar.bz2 MY_URL_PREFIX= MY_URL_SUFFIX= if [[ ${MY_PV} = *-Beta* ]] || [[ ${MY_PV} = *-RC* ]]; then MY_URL_PREFIX='development/' _tmp_last_index=$(($(get_last_version_component_index ${MY_PV})+1)) _tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${MY_PV}) if [[ ${_tmp_suffix} = *Beta* ]] || [[ ${_tmp_suffix} = *RC* ]]; then MY_URL_SUFFIX="-${_tmp_suffix}" fi # Cleaning up temporary variables unset _tmp_last_index unset _tmp_suffix else KEYWORDS="~alpha amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" fi SRC_URI=" http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-core-${MY_PV}.tar.bz2 ipv4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-${MY_PV}.tar.bz2 ) ipv6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-${MY_PV}.tar.bz2 ) lite4? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-lite-${MY_PV}.tar.bz2 ) lite6? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall6-lite-${MY_PV}.tar.bz2 ) init? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/shorewall-init-${MY_PV}.tar.bz2 ) doc? ( http://www.shorewall.net/pub/shorewall/${MY_URL_PREFIX}${MY_MAJOR_RELEASE_NUMBER}/shorewall-${MY_MAJORMINOR_RELEASE_NUMBER}${MY_URL_SUFFIX}/${MY_P_DOCS}.tar.bz2 ) " # - Shorewall6 requires Shorewall # - Installing Shorewall-init or just the documentation doesn't make any sense, # that's why we force the user to select at least one "real" Shorewall product # # See http://shorewall.net/download.htm#Which REQUIRED_USE=" ipv6? ( ipv4 ) || ( ipv4 lite4 lite6 ) " # No build dependencies! Just plain shell scripts... DEPEND="" RDEPEND=" >=net-firewall/iptables-1.4.20 >=sys-apps/iproute2-3.8.0[-minimal] >=sys-devel/bc-1.06.95 ipv4? ( >=dev-lang/perl-5.16 virtual/perl-Digest-SHA ) ipv6? ( >=dev-perl/Socket6-0.230.0 >=net-firewall/iptables-1.4.20[ipv6] >=sys-apps/iproute2-3.8.0[ipv6] ) lite6? ( >=net-firewall/iptables-1.4.20[ipv6] >=sys-apps/iproute2-3.8.0[ipv6] ) init? ( >=sys-apps/coreutils-8.20 ) !net-firewall/shorewall-core !net-firewall/shorewall6 !net-firewall/shorewall-lite !net-firewall/shorewall6-lite !net-firewall/shorewall-init !