summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-11-07 17:40:53 +0100
committerThomas Deutschmann <whissi@gentoo.org>2016-11-07 17:41:08 +0100
commit6e6635b2df37ea16e736151230da53e2617fbbac (patch)
tree205dd747c423cc52afff719cb75e522c59adb9f4 /net-firewall
parentnet-firewall/shorewall: Drop old (diff)
downloadgentoo-6e6635b2df37ea16e736151230da53e2617fbbac.tar.gz
gentoo-6e6635b2df37ea16e736151230da53e2617fbbac.tar.bz2
gentoo-6e6635b2df37ea16e736151230da53e2617fbbac.zip
net-firewall/shorewall: Bump to v5.0.14
Package-Manager: portage-2.3.2
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/shorewall/Manifest7
-rw-r--r--net-firewall/shorewall/shorewall-5.0.14.ebuild452
2 files changed, 459 insertions, 0 deletions
diff --git a/net-firewall/shorewall/Manifest b/net-firewall/shorewall/Manifest
index 6a1817f0e43a..7ba15efeb469 100644
--- a/net-firewall/shorewall/Manifest
+++ b/net-firewall/shorewall/Manifest
@@ -1,14 +1,21 @@
DIST shorewall-5.0.11.tar.bz2 504955 SHA256 b8a836d443c9d94c489dbd8e9672c0c42a4be0ca9a95e4762a64b615d96c8228 SHA512 6240e00fe9a381a35acc6c2307d73fd69a37345a653ee003d0c94a0fd6078e29afbb2237ad2be6ddf952d463e5af4f23cc24426aa7aaebfbb5ed4f3ee9aaa0b5 WHIRLPOOL e3e3b9b19e129f471d60e7a77dbf9bb49232137ad25a192d34fdcba1b44a8275caefffe23e6b2b76b76d685333848d331ea1ebaa4fc8900d651f7df728babe91
DIST shorewall-5.0.13.4.tar.bz2 511274 SHA256 af85e73247655969588699e5b2f199b161adf19477ce13c3a97764a7aa1b6daa SHA512 b77ad3fbe285a6a8b988e3cdb8826b131dc6a7d94b136ba14d07d0173654144ea8bca162cda8cecb2e3249634194ba4f4eefda73be51c69f754c53b05d4ca95d WHIRLPOOL 95e00c92e02c5f9314331bc7a4ec675a565b978b265d222a5d45ef601732f281413324395a81d5f9647d773fab0b29219b7f86546e987c04791a7ce6250783ff
+DIST shorewall-5.0.14.tar.bz2 523293 SHA256 58555cbc61685f2db4402f821effd186f7d8c7e662a1a3171bc2b45111c4b81f SHA512 c96f55fa19687db9d7d9618c566ed9d85cfad9103e91ff49a2b9fcc2f17b1fd224ced1481c58e968397937eb24d0aac16c084491319f14feb884c5d3271a33c5 WHIRLPOOL 3e4f4e301c54417eaf4c97930d4df75c0e04b500f2cfb1466a29c95c8044c73645dd2f8d70929a8f9f89ef3cbaabc1992834e8c3c6d953450aeacaceec264027
DIST shorewall-core-5.0.11.tar.bz2 59845 SHA256 203122ee213bb31e464a25cf4e947800bea595914888cc496dafdd2e202b65ba SHA512 f210d2bbf3ff078a45d76334933d28d03a7a5ed27c1f7c599527f282c3215bcfda95359712e2bb2823e6416fd278cd099fd1fd188d1e21b1c2291802de28fa7b WHIRLPOOL 976660011903e9f688252be7fbc6ce648468156fe8c99c5b20b64fe9e385969f460ba764dce5fd26f99f1ddd527aabea57b896a6db12f8feed1f439a6c10b109
DIST shorewall-core-5.0.13.4.tar.bz2 63124 SHA256 f8340cc9b0bd6aed85d3305887b565c8f93066316037d5962443ca1296d0643b SHA512 b4d3ab1fd99f9536e3ec22a6fcf6c1ca283a5d493cf5ae3ffdd15524bc9f1ab91329decb1faa2d334746a0bf9fc523fbbacb759cd48fbcff6fab6acb71dfb8ed WHIRLPOOL 81cbd0a5501806881e462796ab17a2964f30edd95a3b07e671ac1d9b2df7580e55839331817127beb5f5b487904147a8c83dcc72555136fe045086a7fd7e0b16
+DIST shorewall-core-5.0.14.tar.bz2 63632 SHA256 8be334a556adff955a642d0631f4de0c82323fa34850c7ccf74e8f375d926292 SHA512 914950615250743a3946781b019a50b886083728c62ed5c79aa2d1e48088b8b9bb4358c9042cef2fb21169996be2e22464d4ca5fe4f2a3020d85ad1852740953 WHIRLPOOL 3404bfeafab82c581afd91593aa75a5b7a2d27f83e8c71a3e8fc29cf2a00af2bc037f0ad67361efd903703f18b8a231fdeee27ac19bbdd92f65edeb77f5a3957
DIST shorewall-docs-html-5.0.11.tar.bz2 4270762 SHA256 744d85f5549ecec66007d0e2079aca0b10e78dd10cba806ceedb237c9396dbe7 SHA512 46840e849d3c51c67168b08bd81f5ffb257cd26f0febf26d94fc126ef23da78f996614ea71acec9cceeb280a29bb1250f370a5807bdc5a12a86375f7d41bb1ff WHIRLPOOL 491963832ad539e555dd28c343e1c1362f5581d386221e3f0d66a6735f4d1286b0ac4a100eebafaa564382a55662f12ad43d2223a08f8247c3c40e03246b7d45
DIST shorewall-docs-html-5.0.13.4.tar.bz2 4272429 SHA256 8ea9041bebccb4ceef13373236d297ed13a3a2c804f2409d5cdb8028fe97707b SHA512 fe2d11618ab95d49598d977e7148c8d0fdbc49810b42f7f6e20bc8f550f2c67927002262467248bf91825d447e6e9c6eab5b4f870a19dfb71e298bd1aa09828e WHIRLPOOL 23d758bf78e134e22a6fa93e4a0c8ed257548ac33dc4ba043e8cbec8678bdbaeff1da2639a34cb084eafae6870a8ada6f298e3dd0c99606c03ea47ccd7778320
+DIST shorewall-docs-html-5.0.14.tar.bz2 4290508 SHA256 28fdb0d0b50e9304b19a035b1bdd6b0231f54afeecde93d0ffff1409849db6cf SHA512 b2ea483c926f45b87164a7835634d534b074a05d8e2afc4cd83496b6d34d84c6032ed6f4c23e36df6073df3efd5b28a51c993f2fd411eac64a050ebb5cb6ff73 WHIRLPOOL 5fd436a5513811c8e690112207e74de78ea1b83ced9a3b9fa143474bceec893b4624e84ddcf265e5b353d042e6eaa1fcfa8475f624dc2562a0565b0674ca730a
DIST shorewall-init-5.0.11.tar.bz2 37931 SHA256 0ebb766872d86ac57055fff7be9c5f6044a0a062554dd936d4b9cdf7f6b0ef9d SHA512 e7c3446b753148ad446b354072b8b6421a691670584e99532bfba043352151f87136984691788344d5c4c2aaeb4c36f23e0d3423524cd55488723b2907e03cce WHIRLPOOL 5825fe40fc2f36feb4a78b9c232e784f7bfbed9ce0635c692d80294ac8eb675a5018a5c0570e0d7d431922aa0bfe9aa0da885565b49bf8df0fd26e4d58e2fd61
DIST shorewall-init-5.0.13.4.tar.bz2 40765 SHA256 b03b6969a9d7f312eb5eef5b08ccca4fd875b1b604de43d1c3351ed1e790b0ee SHA512 d90ea2b44e6f50d7a4d0957a8f5e4eb7b6da4e206ae9f6f8ccf22f1c5c07d3c41a1a45d6805a6fef361b1a35a78823d7ba9c592d891cbe7736d305405c8c0b14 WHIRLPOOL bd472da0991d724bb13d9cd028e69e57de97db2f7a6f948271f5b23849519d86e76603ccf2ddf09c8e932723c9a4e1fbd48736a8347a0bf933d59ca1d2a69156
+DIST shorewall-init-5.0.14.tar.bz2 41536 SHA256 7d1e736cf7dda9eb476d4443104ba7fd9b902a9b1cf5a41b0fe10bc95d051dde SHA512 7bbf5d5cdd50cb766d506de96e63f77560cfb21b13c16bfebbf16b7a327939d16a90eb2041405725bd0bcc37d13bc1dde82cde321610fd9f22e171c0db639f7c WHIRLPOOL de211437729b23d7ccc8b1b8622ba7ad05ab45cd9a7eb0d11644fe9a086427554826bf08cb170a2cd1e5ae5af661210e99675de1fba283696d7a7cf9f21c9897
DIST shorewall-lite-5.0.11.tar.bz2 54188 SHA256 3ba77271a7203bdb1fd46bbe7adfefe0b78a5c6d4120aa567586c815c669b3c9 SHA512 d59da77e2ee69e9efdcbdd199159e5b749e03650dbe1e46d3df87c50ef739f2515b363d5aa313dfa8543d9255a46ce9dd8fecebb01e98666cea6b16dc185b52f WHIRLPOOL 8983fcdda937f6df29e91e6dc428c9eb5574a12dfaa4768b4816f18fb51cc1e0ba8aff2b6b8cb0a70f141d268a605aa3d9bdeb1d8e1707185fc382ff11c172e9
DIST shorewall-lite-5.0.13.4.tar.bz2 57203 SHA256 cfcc95c4b4d7a2c0af7d37e193fac6d00d98544e41445dc092ed888671e45ac1 SHA512 cf711f6552337419b24b1f6156297eaafc636d293dd7f7c93dff64f3abaa41ba0e69e2eeba4fd9739bf0aafb785849245886648d6d53da85b8d9c1439f58960d WHIRLPOOL 26c69b913a52d97eb9b50bca407a0d9445953e212bff5509e0b50b5b06bf53651e81a89be79dc80800a7a586cc9945ee4fb15f3ab1ca4ca43f841c7927f73c3e
+DIST shorewall-lite-5.0.14.tar.bz2 57987 SHA256 08576c48f43e8eed145fbd9c810553c929316f9ad090d3f40cf8911437fb2fc1 SHA512 f545c7fb2b56940f42dd16b8b93c81a4e0dd183708f31fd99a647e83f4d493a0a246332f3421b261f33fe134369e511bc6a535df2e6da74655ee203926dd8e0b WHIRLPOOL 43abe36ad5bc1dcbe51ef50c173c8845ab7d24c91be66e4ae43831265b7d6dc655afc65cb90be9f82aae6d5783fa5e9133859ce7397b73abca81725d8c5e487b
DIST shorewall6-5.0.11.tar.bz2 229065 SHA256 a52386b3fe384dbf57e62334fbd2df707ca801a7a420cd87cef1065187769059 SHA512 70a07d5f9b76f0cd0e032ccd158076f96eba871b0d0d832379449b98d91de4a9d4e461bb12bcd880d186d51b4dee79544eaa6e453fbe9f85606a59c8543dce1c WHIRLPOOL 870ebee755c9bfd12d2f29f5ff563245d4cd2a563ab6c5fc7a4febc0864af6712825a0375466a5cc2b23ebbdd1b1c653924699743d8a5010e388a7ed552a1ec3
DIST shorewall6-5.0.13.4.tar.bz2 233740 SHA256 f092a46d55cbfc72624b47b4ba60cba7b179b6c44e58b0ae220564293471aa1f SHA512 4b820948b5d46f2a02c58a7d4837ce32782d3486a52dfbd2d1c84102367ac72abee5f764236b6570d0c38fc293ce0411913cecfaa541bd85528f441b18b56783 WHIRLPOOL f91031414ae2ae1c46acdca86f7e2d659cf699c2b1d8e0ff393cba905fbe8b0ab494e2bc0f09bcd91267fe893d477019434ce2c6ec8ae758e13e768831e02f02
+DIST shorewall6-5.0.14.tar.bz2 239638 SHA256 99ebb3151ad08adf151511cde34f0aaf72e6288c750f557581ca079dc150ae37 SHA512 b9ac7ba20131aa041be735eb9eed1c12f672524755bc05a3d3547101774da2a41d886804e21c7db23580f3327ba397e4452a3734563120f9936d567df1dd455e WHIRLPOOL 89aef2373f726da9636f380b2f46f7257e9e5d634cc0e78cd4770c6d32ff1b936971e5ec0a4c07887ac9e65a98a18e75bffb6f86cf4d5bd1a8c96b2242517e99
DIST shorewall6-lite-5.0.11.tar.bz2 53608 SHA256 3e31469b0d5bdb6fcceba1cf0004e6c36b7ce5814c68f42a66b5aafcbd727120 SHA512 fe46d2feb20d8c5d98a2c3f4ca5210313e40202c20cfa3f1f1e26c20a80f0a6412848ea98a909ac0994ff833423e22df2eb6e63c411b5cf3f5e4403e53c493cf WHIRLPOOL 71f860eb00c969fa2f56ba2f7fc5648e9646abb7e09b09009a8e6c8b2c98fd5dd0a3590649a87f8efbc215436435c52f1f84a2fbc00abed450b7e1a4d5d04fe4
DIST shorewall6-lite-5.0.13.4.tar.bz2 56604 SHA256 89ed17364d4aa1f5db65adf7dac2d26cc78836e9b046c10b56e37a08a2bb3d4f SHA512 19d0d6be14f5ab781d42ca1c1e87806c50ae2a33fc5343b79c0c15b67cb1ee8c2bd8ae4137f4b08a9bbcf0dc25d953dc7be14c9257f66ebbb00e143356040042 WHIRLPOOL 67e37914332ca6a121468b002e2908a9db726af2bea9ffa0bf20270f03a0d5c9797886338dba68856f98ade65fe578272e7271efea9c456634d4e4ecc7fe62bb
+DIST shorewall6-lite-5.0.14.tar.bz2 57426 SHA256 35790cbb60d3d5b29e28da361ff25d3fcd8a1ba5b0e43e4c106c4788e7525603 SHA512 2c1b19443c3e495fc499f27b5e7612c3fcbb60ee59154c6845380eaf6f454a4f11947dc8e85505e50ae7e63ed200b547b37c3dc8076fcfd496ff497f9695257f WHIRLPOOL e097cd0504e3e30df81fe9561ca2ab19b01c4ff7d0d508ccdcf85fe2974c422835d92c2251216a23b71bd040210fe71694d932275ce89521ecc74d0561a9238f
diff --git a/net-firewall/shorewall/shorewall-5.0.14.ebuild b/net-firewall/shorewall/shorewall-5.0.14.ebuild
new file mode 100644
index 000000000000..54d3b67f7c1f
--- /dev/null
+++ b/net-firewall/shorewall/shorewall-5.0.14.ebuild
@@ -0,0 +1,452 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit 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
+ !<sys-apps/systemd-214
+"
+
+S=${WORKDIR}
+
+pkg_pretend() {
+ local CONFIG_CHECK="~NF_CONNTRACK"
+
+ local WARNING_CONNTRACK="Without NF_CONNTRACK support, you will be unable"
+ local WARNING_CONNTRACK+=" to run any shorewall-based firewall on the local system."
+
+ if use ipv4 || use lite4; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4"
+
+ local WARNING_CONNTRACK_IPV4="Without NF_CONNTRACK_IPV4 support, you will"
+ local WARNING_CONNTRACK_IPV4+=" be unable to run any shorewall-based IPv4 firewall on the local system."
+ fi
+
+ if use ipv6 || use lite6; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV6"
+
+ local WARNING_CONNTRACK_IPV6="Without NF_CONNTRACK_IPV6 support, you will"
+ local WARNING_CONNTRACK_IPV6+=" be unable to run any shorewall-based IPv6 firewall on the local system."
+ fi
+
+ check_extra_config
+}
+
+pkg_setup() {
+ if [[ -n "${DIGEST}" ]]; then
+ einfo "Unsetting environment variable \"DIGEST\" to prevent conflicts with package's \"install.sh\" script ..."
+ unset DIGEST
+ fi
+}
+
+src_prepare() {
+ # We are moving each unpacked source from MY_P_* to MY_PN_*.
+ # This allows us to use patches from upstream and keeps epatch_user working
+
+ einfo "Preparing shorewallrc ..."
+ cp "${FILESDIR}"/shorewallrc "${S}"/shorewallrc.gentoo || die "Copying shorewallrc failed"
+ eprefixify "${S}"/shorewallrc.gentoo
+
+ # shorewall-core
+ mv "${S}"/${MY_P_CORE} "${S}"/${MY_PN_CORE} || die "Failed to move '${S}/${MY_P_CORE}' to '${S}/${MY_PN_CORE}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_CORE} ..."
+ ln -s ../shorewallrc.gentoo ${MY_PN_CORE}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ eend 0
+
+ # shorewall
+ if use ipv4; then
+ mv "${S}"/${MY_P_IPV4} "${S}"/${MY_PN_IPV4} || die "Failed to move '${S}/${MY_P_IPV4}' to '${S}/${MY_PN_IPV4}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV4}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV4}/default.gentoo || die "Copying shorewall.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall.initd-r2 "${S}"/${MY_PN_IPV4}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall.systemd "${S}"/${MY_PN_IPV4}/gentoo.service || die "Copying shorewall.systemd failed"
+ eend 0
+ fi
+
+ # shorewall6
+ if use ipv6; then
+ mv "${S}"/${MY_P_IPV6} "${S}"/${MY_PN_IPV6} || die "Failed to move '${S}/${MY_P_IPV6}' to '${S}/${MY_PN_IPV6}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_IPV6}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_IPV6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall.confd-r1 "${S}"/${MY_PN_IPV6}/default.gentoo || die "Copying shorewall.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall.initd-r2 "${S}"/${MY_PN_IPV6}/init.gentoo.sh || die "Copying shorewall.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall6.systemd "${S}"/${MY_PN_IPV6}/gentoo.service || die "Copying shorewall6.systemd failed"
+ eend 0
+ fi
+
+ # shorewall-lite
+ if use lite4; then
+ mv "${S}"/${MY_P_LITE4} "${S}"/${MY_PN_LITE4} || die "Failed to move '${S}/${MY_P_LITE4}' to '${S}/${MY_PN_LITE4}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE4}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE4}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE4}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall-lite.initd-r2 "${S}"/${MY_PN_LITE4}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall-lite.systemd "${S}"/${MY_PN_LITE4}/gentoo.service || die "Copying shorewall-lite.systemd failed"
+ eend 0
+ fi
+
+ # shorewall6-lite
+ if use lite6; then
+ mv "${S}"/${MY_P_LITE6} "${S}"/${MY_PN_LITE6} || die "Failed to move '${S}/${MY_P_LITE6}' to '${S}/${MY_PN_LITE6}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_LITE6}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_LITE6}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-lite.confd-r1 "${S}"/${MY_PN_LITE6}/default.gentoo || die "Copying shorewall-lite.confd-r1 failed"
+ cp "${FILESDIR}"/shorewall-lite.initd-r2 "${S}"/${MY_PN_LITE6}/init.gentoo.sh || die "Copying shorewall-lite.initd-r2 failed"
+ cp "${FILESDIR}"/shorewall6-lite.systemd "${S}"/${MY_PN_LITE6}/gentoo.service || die "Copying shorewall6-lite.systemd failed"
+ eend 0
+ fi
+
+ # shorewall-init
+ if use init; then
+ mv "${S}"/${MY_P_INIT} "${S}"/${MY_PN_INIT} || die "Failed to move '${S}/${MY_P_INIT}' to '${S}/${MY_PN_INIT}'"
+ ebegin "Applying Gentoo-specific changes to ${MY_P_INIT}"
+ ln -s ../shorewallrc.gentoo ${MY_PN_INIT}/shorewallrc.gentoo || die "Failed to symlink shorewallrc.gentoo"
+ cp "${FILESDIR}"/shorewall-init.confd "${S}"/${MY_PN_INIT}/default.gentoo || die "Copying shorewall-init.confd failed"
+ cp "${FILESDIR}"/shorewall-init.initd "${S}"/${MY_PN_INIT}/init.gentoo.sh || die "Copying shorewall-init.initd failed"
+ cp "${FILESDIR}"/shorewall-init.systemd "${S}"/${MY_PN_INIT}/gentoo.service || die "Copying shorewall-init.systemd failed"
+ cp "${FILESDIR}"/shorewall-init.readme "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt || die "Copying shorewall-init.systemd failed"
+ eend 0
+
+ eprefixify "${S}"/${MY_PN_INIT}/init.gentoo.sh
+
+ cd "${S}"/${MY_PN_INIT} || die
+ eapply -p2 "${FILESDIR}"/shorewall-init-01_remove-ipset-functionality.patch
+ cd "${S}" || die
+ fi
+
+ # shorewall-docs-html
+ if use doc; then
+ mv "${S}"/${MY_P_DOCS} "${S}"/${MY_PN_DOCS} || die "Failed to move '${S}/${MY_P_DOCS}' to '${S}/${MY_PN_DOCS}'"
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # shorewall-core
+ einfo "Installing ${MY_P_CORE} ..."
+ DESTDIR="${D%/}" ${MY_PN_CORE}/install.sh shorewallrc.gentoo || die "${MY_PN_CORE}/install.sh failed"
+ dodoc "${S}"/${MY_PN_CORE}/changelog.txt "${S}"/${MY_PN_CORE}/releasenotes.txt
+
+ # shorewall
+ if use ipv4; then
+ einfo "Installing ${MY_P_IPV4} ..."
+ keepdir /var/lib/shorewall
+ DESTDIR="${D%/}" ${MY_PN_IPV4}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV4}/install.sh failed"
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV4}/Samples
+ fi
+ fi
+
+ # shorewall6
+ if use ipv6; then
+ einfo "Installing ${MY_P_IPV6} ..."
+ keepdir /var/lib/shorewall6
+ DESTDIR="${D%/}" ${MY_PN_IPV6}/install.sh shorewallrc.gentoo || die "${MY_PN_IPV6}/install.sh failed"
+
+ if use doc; then
+ dodoc -r "${S}"/${MY_PN_IPV6}/Samples6
+ fi
+ fi
+
+ # shorewall-lite
+ if use lite4; then
+ einfo "Installing ${MY_P_LITE4} ..."
+ keepdir /var/lib/shorewall-lite
+ DESTDIR="${D%/}" ${MY_PN_LITE4}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE4}/install.sh failed"
+ fi
+
+ # shorewall6-lite
+ if use lite6; then
+ einfo "Installing ${MY_P_LITE6} ..."
+ keepdir /var/lib/shorewall6-lite
+ DESTDIR="${D%/}" ${MY_PN_LITE6}/install.sh shorewallrc.gentoo || die "${MY_PN_LITE6}/install.sh failed"
+ fi
+
+ # shorewall-init
+ if use init; then
+ einfo "Installing ${MY_P_INIT} ..."
+ DESTDIR="${D%/}" ${MY_PN_INIT}/install.sh shorewallrc.gentoo || die "${MY_PN_INIT}/install.sh failed"
+ dodoc "${S}"/${MY_PN_INIT}/shorewall-init.README.Gentoo.txt
+
+ if [[ -f "${D}etc/logrotate.d/shorewall-init" ]]; then
+ # On Gentoo, shorewall-init will not create shorewall-ifupdown.log,
+ # so we don't need a logrotate configuration file for shorewall-init
+ einfo "Removing unused \"${D}etc/logrotate.d/shorewall-init\" ..."
+ rm -rf "${D}"etc/logrotate.d/shorewall-init || die "Removing \"${D}etc/logrotate.d/shorewall-init\" failed"
+ fi
+
+ if [[ -d "${D}etc/NetworkManager" ]]; then
+ # On Gentoo, we don't support NetworkManager
+ # so we don't need this folder at all
+ einfo "Removing unused \"${D}etc/NetworkManager\" ..."
+ rm -rf "${D}"etc/NetworkManager || die "Removing \"${D}etc/NetworkManager\" failed"
+ fi
+
+ if [[ -f "${D}usr/share/shorewall-init/ifupdown" ]]; then
+ # This script isn't supported on Gentoo
+ rm -rf "${D}"usr/share/shorewall-init/ifupdown || die "Removing \"${D}usr/share/shorewall-init/ifupdown\" failed"
+ fi
+ fi
+
+ if use doc; then
+ einfo "Installing ${MY_P_DOCS} ..."
+ docinto html && dodoc -r "${S}"/${MY_PN_DOCS}/*
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+
+ # Show first steps for shorewall/shorewall6
+ local _PRODUCTS=""
+ if use ipv4; then
+ _PRODUCTS="shorewall"
+
+ if use ipv6; then
+ _PRODUCTS="${_PRODUCTS}/shorewall6"
+ fi
+ fi
+
+ if [[ -n "${_PRODUCTS}" ]]; then
+ elog "Before you can use ${_PRODUCTS}, you need to edit its configuration in:"
+ elog ""
+ elog " /etc/shorewall/shorewall.conf"
+
+ if use ipv6; then
+ elog " /etc/shorewall6/shorewall6.conf"
+ fi
+
+ elog ""
+ elog "To activate your shorewall-based firewall on system start, please add ${_PRODUCTS} to your default runlevel:"
+ elog ""
+ elog " # rc-update add shorewall default"
+
+ if use ipv6; then
+ elog " # rc-update add shorewall6 default"
+ fi
+ fi
+
+ # Show first steps for shorewall-lite/shorewall6-lite
+ _PRODUCTS=""
+ if use lite4; then
+ _PRODUCTS="shorewall-lite"
+ fi
+
+ if use lite6; then
+ if [[ -z "${_PRODUCTS}" ]]; then
+ _PRODUCTS="shorewall6-lite"
+ else
+ _PRODUCTS="${_PRODUCTS}/shorewall6-lite"
+ fi
+ fi
+
+ if [[ -n "${_PRODUCTS}" ]]; then
+ if use ipv4; then
+ elog ""
+ fi
+
+ elog "Before you can use ${_PRODUCTS}, you need to provide a configuration, which you can"
+ elog "create using ${CATEGORY}/shorewall (with \"ipv4\" and or \"ipv6\" USE flag)."
+ elog ""
+ elog "To read more about ${_PRODUCTS}, please visit"
+ elog " http://shorewall.net/CompiledPrograms.html"
+ elog ""
+ elog "To activate your shorewall-lite-based firewall on system start, please add ${PRODUCTS} to your default runlevel:"
+ elog ""
+
+ if use lite4; then
+ elog " # rc-update add shorewall-lite default"
+ fi
+
+ if use lite6; then
+ elog " # rc-update add shorewall6-lite default"
+ fi
+ fi
+
+ if use init; then
+ elog ""
+ elog "To secure your system on boot, please add shorewall-init to your boot runlevel:"
+ elog ""
+ elog " # rc-update add shorewall-init boot"
+ elog ""
+ elog "and review \$PRODUCTS in"
+ elog ""
+ elog " /etc/conf.d/shorewall-init"
+ fi
+
+ fi
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then
+ # This is an upgrade
+
+ elog "You are upgrading from a previous major version. It is highly recommended that you read"
+ elog ""
+ elog " - /usr/share/doc/shorewall*/releasenotes.tx*"
+ elog " - http://shorewall.net/Shorewall-5.html#idp51151872"
+
+ if use ipv4; then
+ elog ""
+ elog "You can auto-migrate your configuration using"
+ elog ""
+ elog " # shorewall update -A"
+
+ if use ipv6; then
+ elog " # shorewall6 update -A"
+ fi
+
+ elog ""
+ elog "But if you are not familiar with the \"shorewall[6] update\" command,"
+ elog "please read the shorewall[6] man page first."
+ fi
+
+ # Show this elog only once
+ break
+ fi
+ done
+
+ if ! use init; then
+ elog ""
+ elog "Consider emerging ${CATEGORY}/${PN} with USE flag \"init\" to secure your system on boot"
+ elog "before your shorewall-based firewall is ready to start."
+ elog ""
+ elog "To read more about shorewall-init, please visit"
+ elog " http://www.shorewall.net/Shorewall-init.html"
+ fi
+
+ if ! has_version "net-firewall/conntrack-tools"; then
+ elog ""
+ elog "Your Shorewall firewall can utilize \"conntrack\" from the \"net-firewall/conntrack-tools\""
+ elog "package. if you want to use this feature, you need to install \"net-firewall/conntrack-tools\"!"
+ fi
+
+ if ! has_version "dev-perl/Devel-NYTProf"; then
+ elog ""
+ elog "If you want to profile your Shorewall firewall you need to install \"dev-perl/Devel-NYTProf\"!"
+ fi
+}