unos-repository

APK repository for unos
git clone git://git.finwo.net/misc/unos-repository
Log | Files | Refs | README

template (1878B)


      1 # Template file for 'dnsmasq'
      2 pkgname=dnsmasq
      3 version=2.93
      4 revision=0
      5 short_desc="Lightweight DHCP and caching DNS server"
      6 maintainer="finwo <finwo@pm.me>"
      7 license="GPL-2.0-only OR GPL-3.0-only"
      8 homepage="https://thekelleys.org.uk/dnsmasq/doc.html"
      9 distfiles="https://thekelleys.org.uk/dnsmasq/dnsmasq-2.93.tar.xz"
     10 # Upstream .asc verified against Simon Kelley's key
     11 # D6EACBD6EE46B834248D111215CDDA6AE19135A2 before recording this.
     12 checksum=0c00d4e5c97c8306e5fb932b348b34269c9c29a0e7df0e8e82958b407092bc19
     13 depends="glibc busybox"
     14 
     15 # No configure script. Every optional (dbus, idn2, dnssec/nettle, conntrack,
     16 # lua, ubus, nftset) is reached only through COPTS, so an empty COPTS cannot
     17 # pick up a host library; do_build asserts that.
     18 do_build() {
     19   cd "${WRKSRC}"
     20   make -j"$(nproc)" PREFIX=/usr
     21   [ -x src/dnsmasq ] || die "dnsmasq: binary missing after build"
     22   needed=$(readelf -d src/dnsmasq | sed -n 's/^.*NEEDED.*\[\(.*\)\].*$/\1/p' | sort)
     23   for lib in ${needed}; do
     24     case "${lib}" in
     25       libc.so.*) : ;;
     26       *) die "dnsmasq: unexpected NEEDED entry: ${lib}" ;;
     27     esac
     28   done
     29 }
     30 
     31 do_install() {
     32   cd "${WRKSRC}"
     33   make install PREFIX=/usr DESTDIR="${DESTDIR}"
     34   vinstall ${FILESDIR}/dnsmasq.conf 644 etc dnsmasq.conf
     35   vinstall dnsmasq.conf.example 644 usr/share/doc/dnsmasq dnsmasq.conf.example
     36   install -d "${DESTDIR}/etc/dnsmasq.d"
     37   # compiled-in dhcp-leasefile path; absent, dnsmasq exits once a dhcp-range
     38   # is configured
     39   install -d "${DESTDIR}/var/lib/misc"
     40   vinstall ${FILESDIR}/dnsmasq-run 755 etc/sv/dnsmasq run
     41   vinstall ${FILESDIR}/dnsmasq-check 755 etc/sv/dnsmasq check
     42   vinstall ${FILESDIR}/dnsmasq-log-run 755 etc/sv/dnsmasq/log run
     43   ln -sfn /run/runit/supervise.dnsmasq "${DESTDIR}/etc/sv/dnsmasq/supervise"
     44   ln -sfn /run/runit/supervise.dnsmasq-log "${DESTDIR}/etc/sv/dnsmasq/log/supervise"
     45   install -d "${DESTDIR}/var/log/dnsmasq"
     46 }