template (1505B)
1 # Template file for 'linkd' 2 pkgname=linkd 3 version=0.2.0 4 revision=2 5 short_desc="Network interface manager - ifupdown replacement with RESP plugins" 6 maintainer="finwo <finwo@pm.me>" 7 license="GPL-2.0-only" 8 homepage="https://git.finwo.net/app/linkd" 9 depends="busybox iproute2" 10 hostmakedepends="dep" 11 # First-party source, pinned by tag rather than sha256: see srcfiles in 12 # mk/build.sh. 13 srcfiles="https://git.finwo.net/app/linkd/archives/tags/v${version}.tar.gz" 14 15 do_build() { 16 # linkd's Makefile assembles build/<triple>/ and runs `dep install` there, 17 # which needs network access to git.finwo.net for its vendored libraries. 18 # They are branch tips, so this build is not reproducible across upstream 19 # changes; the tag above pins linkd's own code only. 20 make -C "${WRKSRC}" -j"$(nproc)" 21 [ -x "${WRKSRC}/build/linux-glibc-amd64/linkd" ] || die "linkd binary missing after build" 22 } 23 24 do_install() { 25 vinstall "${WRKSRC}/build/linux-glibc-amd64/linkd" 755 usr/bin linkd 26 # multicall: linkd dispatches on basename(argv[0]) 27 for link in linkctl ifup ifdown ifquery ifreload; do 28 ln -sfn linkd "${DESTDIR}/usr/bin/${link}" 29 done 30 vinstall ${FILESDIR}/linkd-run 755 etc/sv/linkd run 31 vinstall ${FILESDIR}/linkd-check 755 etc/sv/linkd check 32 vinstall ${FILESDIR}/linkd-log-run 755 etc/sv/linkd/log run 33 ln -sfn /run/runit/supervise.linkd "${DESTDIR}/etc/sv/linkd/supervise" 34 ln -sfn /run/runit/supervise.linkd-log "${DESTDIR}/etc/sv/linkd/log/supervise" 35 install -d "${DESTDIR}/var/log/linkd" 36 }