diff --git a/srcpkgs/dnsmasq/files/dnsmasq/run b/srcpkgs/dnsmasq/files/dnsmasq/run new file mode 100644 index 0000000000..8590374c69 --- /dev/null +++ b/srcpkgs/dnsmasq/files/dnsmasq/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec dnsmasq -k --enable-dbus -u dnsmasq -g dnsmasq 2>&1 diff --git a/srcpkgs/dnsmasq/template b/srcpkgs/dnsmasq/template index 7a9253fe56..110df157bb 100644 --- a/srcpkgs/dnsmasq/template +++ b/srcpkgs/dnsmasq/template @@ -1,11 +1,13 @@ # Template file for 'dnsmasq' pkgname=dnsmasq version=2.72 -revision=1 +revision=2 hostmakedepends="pkg-config" makedepends="dbus-devel libcap-devel libidn-devel" conf_files="/etc/dnsmasq.conf" +build_options="systemd" system_accounts="dnsmasq" +dnsmasq_homedir="/var/chroot" short_desc="Lightweight, easy to configure DNS forwarder and DHCP server" maintainer="Juan RP " license="GPL-2" @@ -20,7 +22,11 @@ do_build() { do_install() { make PREFIX=/usr DESTDIR=${DESTDIR} install - vinstall dnsmasq.conf.example 644 etc dnsmasq.conf - vinstall ${FILESDIR}/dnsmasq.service 644 usr/lib/systemd/system + vsv dnsmasq + vconf dnsmasq.conf.example dnsmasq.conf vinstall dbus/dnsmasq.conf 644 etc/dbus-1/system.d + + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/dnsmasq.service 644 usr/lib/systemd/system + fi }