/[gentoo-x86]/net-dns/dnsmasq/dnsmasq-2.60.ebuild
Gentoo

Contents of /net-dns/dnsmasq/dnsmasq-2.60.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Aug 28 17:11:42 2012 UTC (19 months, 2 weeks ago) by chutzpah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump (bug #431836). Add installation of a systemd unit (bug # 371871). Make sure LDFLAGS are respected (bug #414223). Clean up some older versions.

(Portage version: 2.1.11.10/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.60.ebuild,v 1.3 2012/06/14 02:08:14 zmedico Exp $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs flag-o-matic user
8
9 MY_P="${P/_/}"
10 MY_PV="${PV/_/}"
11 DESCRIPTION="Small forwarding DNS server"
12 HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
13 SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma"
14
15 LICENSE="|| ( GPL-2 GPL-3 )"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
18 IUSE="conntrack dbus +dhcp idn ipv6 lua nls script tftp"
19
20 RDEPEND="dbus? ( sys-apps/dbus )
21 idn? ( net-dns/libidn )
22 lua? ( dev-lang/lua )
23 conntrack? ( net-libs/libnetfilter_conntrack )
24 nls? (
25 sys-devel/gettext
26 net-dns/libidn
27 )"
28
29 DEPEND="${RDEPEND}
30 virtual/pkgconfig
31 || ( app-arch/xz-utils app-arch/lzma )"
32
33 S="${WORKDIR}/${PN}-${MY_PV}"
34
35 REQUIRED_USE="lua? ( script )"
36
37 use_have() {
38 local NO_ONLY=""
39 if [ $1 == '-n' ]; then
40 NO_ONLY=1
41 shift
42 fi
43
44 local UWORD=${2:-$1}
45 UWORD=${UWORD^^*}
46
47 if ! use ${1}; then
48 echo " -DNO_${UWORD}"
49 elif [ -z "${NO_ONLY}" ]; then
50 echo " -DHAVE_${UWORD}"
51 fi
52 }
53
54 pkg_setup() {
55 enewgroup dnsmasq
56 enewuser dnsmasq -1 -1 /dev/null dnsmasq
57 }
58
59 src_prepare() {
60 # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
61 epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch"
62 sed -i -r 's:lua5.[0-9]+:lua:' Makefile
63 }
64
65 src_configure() {
66 COPTS="$(use_have conntrack)"
67 COPTS+="$(use_have dbus)"
68 COPTS+="$(use_have -n dhcp)"
69 COPTS+="$(use_have idn)"
70 COPTS+="$(use_have -n ipv6)"
71 COPTS+="$(use_have lua luascript)"
72 COPTS+="$(use_have -n script)"
73 COPTS+="$(use_have -n tftp)"
74 COPTS+="$(use ipv6 && use dhcp || echo " -DNO_DHCP6")"
75 }
76
77 src_compile() {
78 emake \
79 PREFIX=/usr \
80 CC="$(tc-getCC)" \
81 CFLAGS="${CFLAGS}" \
82 COPTS="${COPTS}" \
83 all$(use nls && echo "-i18n")
84 }
85
86 src_install() {
87 emake \
88 PREFIX=/usr \
89 MANDIR=/usr/share/man \
90 DESTDIR="${D}" \
91 install$(use nls && echo "-i18n")
92
93 dodoc CHANGELOG CHANGELOG.archive FAQ
94 dodoc -r logo
95
96 dodoc CHANGELOG FAQ
97 dohtml *.html
98
99 newinitd "${FILESDIR}"/dnsmasq-init-r2 dnsmasq
100 newconfd "${FILESDIR}"/dnsmasq.confd-r1 dnsmasq
101
102 insinto /etc
103 newins dnsmasq.conf.example dnsmasq.conf
104
105 if use dbus ; then
106 insinto /etc/dbus-1/system.d
107 doins dbus/dnsmasq.conf
108 fi
109 }

  ViewVC Help
Powered by ViewVC 1.1.20