Lines 1-13
Link Here
|
1 |
# Copyright 1999-2013 Gentoo Foundation |
1 |
# Copyright 1999-2014 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ufw-0.34_pre805.ebuild,v 1.2 2013/05/20 09:05:50 lxnay Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
EAPI=4 |
5 |
EAPI=5 |
6 |
PYTHON_DEPEND="2:2.6 3:3.1" |
6 |
PYTHON_COMPAT=( python2_6 python2_7 python3_2 python3_3 python3_4 ) |
7 |
SUPPORT_PYTHON_ABIS="1" |
7 |
DISTUTILS_IN_SOURCE_BUILD=1 |
8 |
RESTRICT_PYTHON_ABIS="2.5 *-jython" |
|
|
9 |
|
8 |
|
10 |
inherit bash-completion-r1 eutils linux-info distutils systemd |
9 |
inherit bash-completion-r1 eutils linux-info distutils-r1 systemd |
11 |
|
10 |
|
12 |
DESCRIPTION="A program used to manage a netfilter firewall" |
11 |
DESCRIPTION="A program used to manage a netfilter firewall" |
13 |
HOMEPAGE="http://launchpad.net/ufw" |
12 |
HOMEPAGE="http://launchpad.net/ufw" |
Lines 27-32
Link Here
|
27 |
# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982 |
26 |
# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982 |
28 |
RESTRICT="test" |
27 |
RESTRICT="test" |
29 |
|
28 |
|
|
|
29 |
PATCHES=( |
30 |
# Remove unnecessary build time dependency on net-firewall/iptables. |
31 |
"${FILESDIR}"/${PN}-0.33-dont-check-iptables.patch |
32 |
# Move files away from /lib/ufw. |
33 |
"${FILESDIR}"/${PN}-0.31.1-move-path.patch |
34 |
# Remove shebang modification. |
35 |
"${FILESDIR}"/${P}-shebang.patch |
36 |
) |
37 |
|
30 |
pkg_pretend() { |
38 |
pkg_pretend() { |
31 |
local CONFIG_CHECK="~PROC_FS |
39 |
local CONFIG_CHECK="~PROC_FS |
32 |
~NETFILTER_XT_MATCH_COMMENT ~NETFILTER_XT_MATCH_HL |
40 |
~NETFILTER_XT_MATCH_COMMENT ~NETFILTER_XT_MATCH_HL |
Lines 93-108
Link Here
|
93 |
fi |
101 |
fi |
94 |
} |
102 |
} |
95 |
|
103 |
|
96 |
src_prepare() { |
104 |
python_prepare_all() { |
97 |
# Allow to remove unnecessary build time dependency |
|
|
98 |
# on net-firewall/iptables. |
99 |
epatch "${FILESDIR}"/${PN}-0.33-dont-check-iptables.patch |
100 |
# Move files away from /lib/ufw. |
101 |
epatch "${FILESDIR}"/${PN}-0.31.1-move-path.patch |
102 |
# Contains fixes related to SUPPORT_PYTHON_ABIS="1" (see comment in the |
103 |
# file). |
104 |
epatch "${FILESDIR}"/${PN}-0.31.1-python-abis.patch |
105 |
|
106 |
# Set as enabled by default. User can enable or disable |
105 |
# Set as enabled by default. User can enable or disable |
107 |
# the service by adding or removing it to/from a runlevel. |
106 |
# the service by adding or removing it to/from a runlevel. |
108 |
sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \ |
107 |
sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \ |
Lines 128-136
Link Here
|
128 |
else |
127 |
else |
129 |
_EMPTY_LOCALE_LIST="no" |
128 |
_EMPTY_LOCALE_LIST="no" |
130 |
fi |
129 |
fi |
|
|
130 |
|
131 |
distutils-r1_python_prepare_all |
131 |
} |
132 |
} |
132 |
|
133 |
|
133 |
src_install() { |
134 |
python_install_all() { |
134 |
newconfd "${FILESDIR}"/ufw.confd ufw |
135 |
newconfd "${FILESDIR}"/ufw.confd ufw |
135 |
newinitd "${FILESDIR}"/ufw-2.initd ufw |
136 |
newinitd "${FILESDIR}"/ufw-2.initd ufw |
136 |
systemd_dounit "${FILESDIR}/ufw.service" |
137 |
systemd_dounit "${FILESDIR}/ufw.service" |
Lines 150-162
Link Here
|
150 |
insinto /usr/share/doc/${PF}/examples |
151 |
insinto /usr/share/doc/${PF}/examples |
151 |
doins examples/* |
152 |
doins examples/* |
152 |
fi |
153 |
fi |
153 |
distutils_src_install |
|
|
154 |
[[ $_EMPTY_LOCALE_LIST != yes ]] && domo locales/mo/*.mo |
155 |
newbashcomp shell-completion/bash ${PN} |
154 |
newbashcomp shell-completion/bash ${PN} |
|
|
155 |
|
156 |
[[ $_EMPTY_LOCALE_LIST != yes ]] && domo locales/mo/*.mo |
157 |
|
158 |
distutils-r1_python_install_all |
159 |
python_replicate_script "${D}usr/sbin/ufw" |
156 |
} |
160 |
} |
157 |
|
161 |
|
158 |
pkg_postinst() { |
162 |
pkg_postinst() { |
159 |
distutils_pkg_postinst |
|
|
160 |
if [[ -z ${REPLACING_VERSIONS} ]]; then |
163 |
if [[ -z ${REPLACING_VERSIONS} ]]; then |
161 |
echo |
164 |
echo |
162 |
elog "To enable ufw, add it to boot sequence and activate it:" |
165 |
elog "To enable ufw, add it to boot sequence and activate it:" |