Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/fwknop/
Date: Tue, 24 Nov 2015 23:28:31
Message-Id: 1448407680.d7ffdfbff01fcb89fda56483b488c325fd23aa36.idella4@gentoo
1 commit: d7ffdfbff01fcb89fda56483b488c325fd23aa36
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 23 14:42:59 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 23:28:00 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7ffdfbf
7
8 net-firewall/fwknop: revbump to 2.6.7-r2 in order to fix dependencies
9
10 Separate RDEPEND and DEPEND properly.
11
12 net-firewall/fwknop/fwknop-2.6.7-r2.ebuild | 135 +++++++++++++++++++++++++++++
13 1 file changed, 135 insertions(+)
14
15 diff --git a/net-firewall/fwknop/fwknop-2.6.7-r2.ebuild b/net-firewall/fwknop/fwknop-2.6.7-r2.ebuild
16 new file mode 100644
17 index 0000000..18c6e90
18 --- /dev/null
19 +++ b/net-firewall/fwknop/fwknop-2.6.7-r2.ebuild
20 @@ -0,0 +1,135 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +AUTOTOOLS_AUTORECONF=1
28 +DISABLE_AUTOFORMATTING=1
29 +
30 +DISTUTILS_OPTIONAL=1
31 +# Python extension supports only Python2
32 +# See https://github.com/mrash/fwknop/issues/167
33 +PYTHON_COMPAT=( python2_7 )
34 +
35 +inherit autotools-utils distutils-r1 linux-info readme.gentoo systemd
36 +
37 +DESCRIPTION="Single Packet Authorization and Port Knocking application"
38 +HOMEPAGE="http://www.cipherdyne.org/fwknop/"
39 +SRC_URI="https://github.com/mrash/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
40 +
41 +LICENSE="GPL-2"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~x86"
44 +IUSE="client extras firewalld gdbm gpg iptables python server udp-server"
45 +
46 +DEPEND="
47 + client? ( net-misc/wget[ssl] )
48 + firewalld? ( net-firewall/firewalld[${PYTHON_USEDEP}] )
49 + gdbm? ( sys-libs/gdbm )
50 + gpg? (
51 + app-crypt/gpgme
52 + dev-libs/libassuan
53 + dev-libs/libgpg-error
54 + )
55 + iptables? ( net-firewall/iptables )
56 + python? ( ${PYTHON_DEPS} )
57 + server? ( !udp-server? ( net-libs/libpcap ) )
58 +"
59 +RDEPEND="${DEPEND}"
60 +
61 +REQUIRED_USE="
62 + python? ( ${PYTHON_REQUIRED_USE} )
63 + firewalld? ( server )
64 + iptables? ( server )
65 + server? ( ^^ ( firewalld iptables ) )
66 + udp-server? ( server )
67 +"
68 +
69 +DOCS=( ChangeLog README.md )
70 +
71 +DOC_CONTENTS="
72 +Example configuration files were installed in /etc/fwknopd directory.
73 +Please edit them to fit your needs and then remove the .example suffix.
74 +
75 +fwknopd supports several backends: firewalld, iptables, ipfw, pf, ipf.
76 +You can set the desired backend via FIREWALL_EXE option in fwknopd.conf
77 +instead of the default one chosen at compile time.
78 +"
79 +
80 +pkg_pretend() {
81 + if use server; then
82 + if ! linux_config_exists || ! linux_chkconfig_present NETFILTER_XT_MATCH_COMMENT; then
83 + ewarn "fwknopd uses the iptables 'comment' match to expire SPA rules,"
84 + ewarn "which is a major security feature and is enabled by default."
85 + ewarn "Please either enable NETFILTER_XT_MATCH_COMMENT support in your"
86 + ewarn "kernel, or set the appropriate ENABLE_{FIREWD,IPT}_COMMENT_CHECK"
87 + ewarn "to 'N' in your fwknopd.conf file."
88 + fi
89 + fi
90 +}
91 +
92 +src_prepare() {
93 + # Install example configs with .example suffix
94 + if use server; then
95 + sed -i -e 's/conf;/conf.example;/g' "${S}"/Makefile.am || die
96 + fi
97 +
98 + autotools-utils_src_prepare
99 +
100 + if use python; then
101 + cd "${S}"/python || die
102 + distutils-r1_src_prepare
103 + fi
104 +}
105 +
106 +src_configure() {
107 + local myeconfargs=(
108 + --localstatedir=/run
109 + --enable-digest-cache
110 + $(use_enable client)
111 + $(use_enable !gdbm file-cache)
112 + $(use_enable server)
113 + $(use_enable udp-server)
114 + $(use_with gpg gpgme)
115 + )
116 + use firewalld && myeconfargs+=(--with-firewalld=/usr/sbin/firewalld)
117 + use iptables && myeconfargs+=(--with-iptables=/sbin/iptables)
118 +
119 + autotools-utils_src_configure
120 +}
121 +
122 +src_compile() {
123 + autotools-utils_src_compile
124 +
125 + if use python; then
126 + cd "${S}"/python || die
127 + distutils-r1_src_compile
128 + fi
129 +}
130 +
131 +src_install() {
132 + autotools-utils_src_install
133 + prune_libtool_files --modules
134 +
135 + if use server; then
136 + newinitd "${FILESDIR}/fwknopd.init-r1" fwknopd
137 + newconfd "${FILESDIR}/fwknopd.confd" fwknopd
138 + systemd_dounit extras/systemd/fwknopd.service
139 + systemd_newtmpfilesd extras/systemd/fwknopd.tmpfiles.conf fwknopd.conf
140 + readme.gentoo_create_doc
141 + fi
142 +
143 + use extras && dodoc "${S}/extras/apparmor/usr.sbin.fwknopd"
144 +
145 + if use python; then
146 + # Unset DOCS since distutils-r1.eclass interferes
147 + local DOCS=()
148 + cd "${S}"/python || die
149 + distutils-r1_src_install
150 + fi
151 +}
152 +
153 +pkg_postinst() {
154 + use server && readme.gentoo_print_elog
155 +}