aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-27 14:40:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-27 14:40:32 +0000
commit174a39af8309302fcbb0432417af18d5568a2c57 (patch)
treeb9780aeda636b2822335cc0507ba2ffb022761d9
parent3630653b3a2e233c3b910ebe7788a76c6506c231 (diff)
extra/dnsmasq: new aport
Dnsmasq a lightweight, caching DNS proxy with integrated DHCP server. http://www.thekelleys.org.uk/
-rw-r--r--extra/dnsmasq/APKBUILD35
-rw-r--r--extra/dnsmasq/dnsmasq.confd4
-rw-r--r--extra/dnsmasq/dnsmasq.initd38
3 files changed, 77 insertions, 0 deletions
diff --git a/extra/dnsmasq/APKBUILD b/extra/dnsmasq/APKBUILD
new file mode 100644
index 00000000000..a5ee1c9c936
--- /dev/null
+++ b/extra/dnsmasq/APKBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dnsmasq
+pkgver=2.46
+pkgrel=0
+pkgdesc="Small forwarding DNS server"
+url="http://www.thekelleys.org.uk/dnsmasq/"
+license="GPL-2"
+depends="uclibc"
+subpackages="$pkgname-doc"
+source="http://www.thekelleys.org.uk/dnsmasq/$pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ "
+
+build() {
+ # src_unpack
+ cd "$srcdir/$pkgname-$pkgver"
+ sed -i -e 's/^AWK.*/AWK = awk/' Makefile
+ make PREFIX=/usr \
+ CFLAGS="$CFLAGS" \
+ DBUS_LIBS= \
+ DBUS_CFLAGS= \
+ DBUS_MINOR= \
+ all || return 1
+ make PREFIX=/usr \
+ DESTDIR="$pkgdir" \
+ DBUS_LIBS= \
+ DBUS_CFLAGS= \
+ DBUS_MINOR= \
+ install
+ install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install dnsmasq.conf.example "$pkgdir"/etc/dnsmasq.conf
+}
+md5sums="79ec740d1a10ee75f13efa4ff36d0250 dnsmasq-2.46.tar.gz"
diff --git a/extra/dnsmasq/dnsmasq.confd b/extra/dnsmasq/dnsmasq.confd
new file mode 100644
index 00000000000..47826dd5082
--- /dev/null
+++ b/extra/dnsmasq/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/extra/dnsmasq/dnsmasq.initd b/extra/dnsmasq/dnsmasq.initd
new file mode 100644
index 00000000000..44109e98295
--- /dev/null
+++ b/extra/dnsmasq/dnsmasq.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2004 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.13 2008/01/29 15:06:30 flameeyes Exp $
+
+opts="reload"
+
+depend() {
+ provide dns
+ need localmount net
+ after bootmisc
+}
+
+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 $?
+}