SV: [PATCH 6/7] dnsmasq: New recipe

Submitted by kim.hansen@prevas.dk on Jan. 6, 2015, 3:05 p.m.

Details

Message ID BD22328D0EB182418C2A0952DC2454F8808702F3@VMPREVAS2.prevas.se
State New
Headers show

Commit Message

kim.hansen@prevas.dk Jan. 6, 2015, 3:05 p.m.
Hi Kim,

Could you resubmit this on github without the commented out line and run packageqa?

Otherwise it looks fine

/Kim

Patch hide | download patch | download mbox

diff --git a/recipes/dnsmasq/dnsmasq.inc b/recipes/dnsmasq/dnsmasq.inc
new file mode 100644
index 0000000..a4ed159
--- /dev/null
+++ b/recipes/dnsmasq/dnsmasq.inc
@@ -0,0 +1,25 @@ 
+DESCRIPTION = "dnsmasq"
+HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
+LICENSE = "GPL-3"
+
+SRC_URI = "http://www.thekelleys.org.uk/${PN}/${PN}-${PV}.tar.gz"
+SRC_URI += "file://dnsmasq"
+SRC_URI += "file://makefile.patch"
+
+inherit c make sysvinit pkgconfig
+
+RECIPE_FLAGS += "dnsmasq_sysvinit_start"
+DEFAULT_USE_dnsmasq_sysvinit_start = "97"
+DEFAULT_USE_dnsmasq_sysvinit_stop = "0"
+SYSVINIT_SCRIPT_dnsmasq = "dnsmasq"
+
+do_install[postfuncs] =+ " do_install_dnsmasq_extra"
+do_install_dnsmasq_extra() {
+        install -d 755 ${D}${bindir} ${D}${sysconfdir}/init.d
+
+        install -m 755 ${SRCDIR}/dnsmasq ${D}${sysconfdir}/init.d
+        #install -m 755 ${S}/src/dnsmasq ${D}${bindir}/
+        install -m 755 ${S}/dnsmasq.conf.example ${D}${sysconfdir}/
+}
+
+FILES_${PN} += " ${sysconfdir} ${bindir}"
diff --git a/recipes/dnsmasq/dnsmasq_2.71.oe b/recipes/dnsmasq/dnsmasq_2.71.oe
new file mode 100644
index 0000000..8a5b07c
--- /dev/null
+++ b/recipes/dnsmasq/dnsmasq_2.71.oe
@@ -0,0 +1,2 @@ 
+require dnsmasq.inc
+
diff --git a/recipes/dnsmasq/dnsmasq_2.71.oe.sig b/recipes/dnsmasq/dnsmasq_2.71.oe.sig
new file mode 100644
index 0000000..2cc94f0
--- /dev/null
+++ b/recipes/dnsmasq/dnsmasq_2.71.oe.sig
@@ -0,0 +1 @@ 
+b0a39f66557c966629a0ed9282cd87df8f409004  dnsmasq-2.71.tar.gz
diff --git a/recipes/dnsmasq/files/dnsmasq b/recipes/dnsmasq/files/dnsmasq
new file mode 100755
index 0000000..4dbece2
--- /dev/null
+++ b/recipes/dnsmasq/files/dnsmasq
@@ -0,0 +1,34 @@ 
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/dnsmasq
+NAME=dnsmasq
+DESC="Dnsmasq - DNS server"
+OPTS=""
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: "
+       start-stop-daemon --start -x "$DAEMON" -- $OPTS
+       echo "$NAME."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       start-stop-daemon --stop -x "$DAEMON"
+       echo "$NAME."
+       ;;
+  restart|force-reload)
+       echo -n "Restarting $DESC: "
+       start-stop-daemon --stop -x "$DAEMON"
+       sleep 1
+       start-stop-daemon --start -x "$DAEMON" -- $OPTS
+       echo "$NAME."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       echo "Usage: $N {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/recipes/dnsmasq/files/makefile.patch b/recipes/dnsmasq/files/makefile.patch
new file mode 100644
index 0000000..5b62741
--- /dev/null
+++ b/recipes/dnsmasq/files/makefile.patch
@@ -0,0 +1,11 @@ 
+--- dnsmasq-2.71/Makefile.orig 2014-09-09 22:19:14.705703992 +0200
++++ dnsmasq-2.71/Makefile      2014-09-09 22:21:03.441706034 +0200
+@@ -18,7 +18,7 @@
+
+ # Variables you may well want to override.
+
+-PREFIX        = /usr/local
++PREFIX        = /usr
+ BINDIR        = $(PREFIX)/sbin
+ MANDIR        = $(PREFIX)/share/man
+ LOCALEDIR     = $(PREFIX)/share/locale