diff options
-rw-r--r-- | net-dns/dnsmasq/Manifest | 6 | ||||
-rw-r--r-- | net-dns/dnsmasq/dnsmasq-2.57.ebuild | 75 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch | 16 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init | 39 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq.confd | 4 | ||||
-rw-r--r-- | net-dns/dnsmasq/metadata.xml | 14 |
6 files changed, 154 insertions, 0 deletions
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest new file mode 100644 index 0000000..eca4244 --- /dev/null +++ b/net-dns/dnsmasq/Manifest @@ -0,0 +1,6 @@ +AUX dnsmasq-2.47-fbsd-config.patch 505 RMD160 a19a17e94d924a21f79d50420faa4c2ed3ec40d0 SHA1 723580b460c93e2f7829627dee15bb758730b848 SHA256 4e05e46b59254e718550cda505986b9b572a0716636fb6a5405a54df25cfa84a +AUX dnsmasq-init 935 RMD160 8f6278946311abdc4c7ae8034ca8571cb24bb53b SHA1 7c34f475dc3c6afdc14fffdaf24f866e056c334f SHA256 30da83047c1a30e008e38bc398b3ac2a50d78f23d559b5c8ff7a22145786e05b +AUX dnsmasq.confd 140 RMD160 33f6370377b38bf33acab72d8de86cba5e197d79 SHA1 83461d2964dc3f0db777fc26141b07f6f3f5a762 SHA256 8bbc2634ab537ed3a17ee98be9c2667013a2b048f6981138017414e54fe90746 +DIST dnsmasq-2.57.tar.lzma 333348 RMD160 e78d2f87804e88b2021da3c593191338d0deaed4 SHA1 cbf0c22a7b856746b23f2d894070c60d32c4a97e SHA256 b35c5a31afce2b7c4bd62566d5dc87e1ce62d0d2ebd9c2baf15b5ea16bcc279d +EBUILD dnsmasq-2.57.ebuild 1734 RMD160 d630852d5e5ce0cb89157e17967579bd37010aa8 SHA1 0bea49192943f503e6b2d743ebe51a93a88c63b3 SHA256 907bb383ce75a9f10c6b7ad91012874be6980af97c397ef54db34e24876e7ea6 +MISC metadata.xml 409 RMD160 059cae7fc03f12c391df3954a25b50b98f8fd616 SHA1 3b262afb2f3281150f03de7e7ee5019d1ddf3a32 SHA256 b8cb70c6cedee588056993ffa8a720fcb3248dc8d10bf6397910cf8fed07b4e2 diff --git a/net-dns/dnsmasq/dnsmasq-2.57.ebuild b/net-dns/dnsmasq/dnsmasq-2.57.ebuild new file mode 100644 index 0000000..30af17f --- /dev/null +++ b/net-dns/dnsmasq/dnsmasq-2.57.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/dnsmasq-2.57.ebuild,v 1.6 2011/04/16 18:23:07 armin76 Exp $ + +EAPI=2 + +inherit eutils toolchain-funcs flag-o-matic + +MY_P="${P/_/}" +MY_PV="${PV/_/}" +DESCRIPTION="Small forwarding DNS server" +HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/" +SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${MY_P}.tar.lzma" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ~ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="dbus +dhcp idn ipv6 nls tftp" + +RDEPEND="dbus? ( sys-apps/dbus ) + idn? ( net-dns/libidn ) + nls? ( + sys-devel/gettext + net-dns/libidn + )" + +DEPEND="${RDEPEND} + dev-util/pkgconfig + || ( app-arch/xz-utils app-arch/lzma-utils )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +src_prepare() { + # dnsmasq on FreeBSD wants the config file in a silly location, this fixes + epatch "${FILESDIR}/${PN}-2.47-fbsd-config.patch" +} + +src_configure() { + COPTS="" + use tftp || COPTS+=" -DNO_TFTP" + use dhcp || COPTS+=" -DNO_DHCP" + use ipv6 || COPTS+=" -DNO_IPV6" + use dbus && COPTS+=" -DHAVE_DBUS" + use idn && COPTS+=" -DHAVE_IDN" +} + +src_compile() { + emake \ + PREFIX=/usr \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + COPTS="${COPTS}" \ + all$(use nls && echo "-i18n") || die +} + +src_install() { + emake \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + DESTDIR="${D}" \ + install$(use nls && echo "-i18n") || die + + dodoc CHANGELOG FAQ + dohtml *.html + + newinitd "${FILESDIR}"/dnsmasq-init dnsmasq + newconfd "${FILESDIR}"/dnsmasq.confd dnsmasq + insinto /etc + newins dnsmasq.conf.example dnsmasq.conf + + if use dbus ; then + insinto /etc/dbus-1/system.d + doins dbus/dnsmasq.conf + fi +} diff --git a/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch new file mode 100644 index 0000000..38a3679 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch @@ -0,0 +1,16 @@ +diff -ur dnsmasq-2.47.orig/src/config.h dnsmasq-2.47/src/config.h +--- dnsmasq-2.47.orig/src/config.h 2009-02-05 07:14:24.000000000 -0500 ++++ dnsmasq-2.47/src/config.h 2009-03-30 00:04:52.000000000 -0400 +@@ -50,11 +50,7 @@ + #endif + + #ifndef CONFFILE +-# if defined(__FreeBSD__) +-# define CONFFILE "/usr/local/etc/dnsmasq.conf" +-# else +-# define CONFFILE "/etc/dnsmasq.conf" +-# endif ++# define CONFFILE "/etc/dnsmasq.conf" + #endif + + #define DEFLEASE 3600 /* default lease time, 1 hour */ diff --git a/net-dns/dnsmasq/files/dnsmasq-init b/net-dns/dnsmasq/files/dnsmasq-init new file mode 100644 index 0000000..b3d19c1 --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq-init @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init,v 1.14 2010/11/19 16:04:20 chutzpah Exp $ + +opts="reload" + +depend() { + provide dns + need localmount net + after bootmisc + use logger +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dnsmasq \ + --pidfile /var/run/dnsmasq.pid \ + -- -x /var/run/dnsmasq.pid ${DNSMASQ_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/dnsmasq \ + --pidfile /var/run/dnsmasq.pid + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + if ! service_started "${SVCNAME}" ; then + eend 1 "${SVCNAME} is not started" + return 1 + fi + start-stop-daemon --stop --oknodo --signal HUP \ + --exec /usr/sbin/dnsmasq --pidfile /var/run/dnsmasq.pid + eend $? +} diff --git a/net-dns/dnsmasq/files/dnsmasq.confd b/net-dns/dnsmasq/files/dnsmasq.confd new file mode 100644 index 0000000..47826dd --- /dev/null +++ b/net-dns/dnsmasq/files/dnsmasq.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/dnsmasq: config file for /etc/init.d/dnsmasq + +# See the dnsmasq(8) man page for possible options to put here. +DNSMASQ_OPTS="" diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml new file mode 100644 index 0000000..d8739e6 --- /dev/null +++ b/net-dns/dnsmasq/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> +<email>chutzpah@gentoo.org</email> +<name>Patrick McLean</name> +</maintainer> +<use> + <flag name='dhcp'>Enable support for reading ISC DHCPd lease files</flag> + <flag name='tftp'>Enables built in TFTP server for netbooting</flag> +</use> +</pkgmetadata> + |