void-packages/srcpkgs/dnsmasq/template
Jürgen Buchmüller b0f5072a18 dnsmasq: add build option for dnssec
I wasn't sure if this should be default enabled or not and left it disabled.
2018-01-14 11:33:14 +01:00

33 lines
1.1 KiB
Bash

# Template file for 'dnsmasq'
pkgname=dnsmasq
version=2.78
revision=1
hostmakedepends="pkg-config"
makedepends="dbus-devel libcap-devel libidn-devel $(vopt_if dnssec nettle-devel)"
conf_files="/etc/dnsmasq.conf"
system_accounts="dnsmasq"
dnsmasq_homedir="/var/chroot"
short_desc="Lightweight, easy to configure DNS forwarder and DHCP server"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://www.thekelleys.org.uk/dnsmasq/doc.html"
distfiles="http://www.thekelleys.org.uk/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=c92e5d78aa6353354d02aabf74590d08980bb1385d8a00b80ef9bc80430aa1dc
build_options="dnssec"
desc_option_dnssec="Enable DNSSEC support via nettle"
do_build() {
echo '#define HAVE_DBUS' >> src/config.h
if [ "$build_option_dnssec" ]; then
echo '#define HAVE_DNSSEC' >> src/config.h
fi
make CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${makejobs}
}
do_install() {
make PREFIX=/usr BINDIR=/usr/bin DESTDIR=${DESTDIR} install
vsv dnsmasq
vconf dnsmasq.conf.example dnsmasq.conf
vinstall dbus/dnsmasq.conf 644 etc/dbus-1/system.d
}