]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - net-dns/rbldnsd/rbldnsd-0.997a.ebuild
Add rbldnsd in preparation for fixing two bugs.
[mjo-overlay.git] / net-dns / rbldnsd / rbldnsd-0.997a.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-dns/rbldnsd/rbldnsd-0.997.ebuild,v 1.3 2013/09/05 18:59:06 mgorny Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7} )
7
8 inherit eutils toolchain-funcs user python-single-r1
9
10 DESCRIPTION="DNS server designed to serve blacklist zones"
11 HOMEPAGE="http://www.corpit.ru/mjt/rbldnsd.html"
12 SRC_URI="http://www.corpit.ru/mjt/rbldnsd/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~hppa ~sparc ~x86 ~x86-fbsd"
17 IUSE="ipv6 test zlib"
18
19 RDEPEND="zlib? ( sys-libs/zlib )"
20 DEPEND="${RDEPEND}
21 test? ( ${PYTHON_DEPS}
22 dev-python/pydns:2[${PYTHON_USEDEP}] )"
23
24 src_prepare() {
25 epatch "${FILESDIR}/${P}-robust-ipv6-test-support.patch"
26 }
27
28 src_configure() {
29 # The ./configure file is handwritten and doesn't support a `make
30 # install` target, so there are no --prefix options. The econf
31 # function appends those automatically, so we can't use it.
32 ./configure \
33 $(use_enable ipv6) \
34 $(use_enable zlib) \
35 || die "./configure failed"
36 }
37
38 src_compile() {
39 emake \
40 AR="$(tc-getAR)" \
41 CC="$(tc-getCC)" \
42 RANLIB="$(tc-getRANLIB)"
43 }
44
45 src_test() {
46 emake check \
47 CC="$(tc-getCC)" \
48 PYTHON="${PYTHON}"
49 }
50
51 src_install() {
52 dosbin rbldnsd
53 doman rbldnsd.8
54 keepdir /var/db/rbldnsd
55 dodoc CHANGES* TODO NEWS README*
56 newinitd "${FILESDIR}"/initd-${PV} rbldnsd
57 newconfd "${FILESDIR}"/confd-${PV} rbldnsd
58 }
59
60 pkg_postinst() {
61 enewgroup rbldns
62 enewuser rbldns -1 -1 /var/db/rbldnsd rbldns
63 chown rbldns:rbldns /var/db/rbldnsd
64 }