pkgname=dnsmasq pkgver=2.90 pkgrel=1 pkgdesc="Network infrastructure for small networks: DNS, DHCP, router advertisement, network boot, tethering on smartphones and portable hotspots" url="https://www.thekelleys.org.uk/dnsmasq/doc.html" arch=('x86_64') license=('GPL') depends=('glibc' 'dbus' 'gmp' 'nettle' 'libidn2') install=dnsmasq.install backup=('etc/dnsmasq.conf') source=("https://www.thekelleys.org.uk/dnsmasq/${pkgname}-${pkgver}.tar.xz" 'dnsmasq.service' "https://github.com/themiron/dnsmasq/commit/6fd9aba7abe1e084123bc5002959350897774ace.diff") md5sums=('58b511a118301b8fe4e89f9734957937' '596c88fc2492f99edf71e398b85a69f4' '648099feae4f8dec9b4a1c133b7f72f4') build() { cd ${pkgname}-${pkgver} #patch -p1 -i ${srcdir}/6fd9aba7abe1e084123bc5002959350897774ace.diff #sed -e "s|nettle_secp_256r1|nettle_get_secp_256r1|" -i src/crypto.c make \ CFLAGS="$CPPFLAGS $CFLAGS" \ LDFLAGS="$LDFLAGS" \ COPTS="-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2" } package() { cd ${pkgname}-${pkgver} make \ COPTS="-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2" \ BINDIR=/usr/bin PREFIX=/usr DESTDIR=${pkgdir} install install -Dm644 dbus/dnsmasq.conf ${pkgdir}/etc/dbus-1/system.d/dnsmasq.conf install -Dm644 dnsmasq.conf.example ${pkgdir}/etc/dnsmasq.conf install -Dm644 ${srcdir}/dnsmasq.service ${pkgdir}/usr/lib/systemd/system/dnsmasq.service sed -i 's|%%PREFIX%%|/usr|' $pkgdir/etc/dnsmasq.conf install -Dm644 trust-anchors.conf $pkgdir/usr/share/dnsmasq/trust-anchors.conf }