# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 PYTHON_DEPEND="2:2.5:2.7" inherit versionator bash-completion prefix python distutils DESCRIPTION="Uncomplicated FireWall: A program used to manage a netfilter firewall." HOMEPAGE="http://launchpad.net/ufw" MY_PV_12=$(get_version_component_range 1-2) SRC_URI="http://launchpad.net/ufw/${MY_PV_12}/${PV}/+download/${PN}-${PV}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="examples" RDEPEND="=net-firewall/iptables-1.4*" DEPEND="${RDEPEND}" RESTRICT="test" src_test() { sh run_tests.sh || die "test(s) failed" } src_prepare() { cp "${FILESDIR}"/ufw.{confd,initd} "${T}/" eprefixify "${T}"/ufw.{confd,initd} } src_compile() { sh tests/check-requirements || die distutils_src_compile } src_install() { newconfd "${T}"/ufw.confd ufw || die "inserting a file to conf.d failed" newinitd "${T}"/ufw.initd ufw || die "inserting a file to init.d failed" distutils_src_install if use examples; then dodoc doc/rsyslog.example || die "inserting exampl rsyslog configuration failed" insinto /usr/share/doc/${PF}/examples doins examples/* || die "inserting example files failed" fi dobashcompletion shell-completion/bash } pkg_postinst() { elog "Remember to enable ufw add it to your boot sequence:" elog "-- # ufw enable" elog "-- # rc-update add ufw boot" echo bash-completion_pkg_postinst }