template (1536B)
1 # Template file for 'linkd' 2 pkgname=linkd 3 version=0.1.0 4 revision=1 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. Until git.finwo.net serves tag archives, seed the cache by 13 # dropping the tarball at build/work/sources/linkd-v0.1.0.tar.gz -- the fetch 14 # is skipped whenever that file already exists. 15 srcfiles="https://git.finwo.net/app/linkd/archives/tags/v${version}.tar.gz" 16 17 do_build() { 18 # linkd's Makefile assembles build/<triple>/ and runs `dep install` there, 19 # which needs network access to git.finwo.net for its vendored libraries. 20 # They are branch tips, so this build is not reproducible across upstream 21 # changes; the tag above pins linkd's own code only. 22 make -C "${WRKSRC}" -j"$(nproc)" 23 [ -x "${WRKSRC}/build/linux-glibc-amd64/linkd" ] || die "linkd binary missing after build" 24 } 25 26 do_install() { 27 vinstall "${WRKSRC}/build/linux-glibc-amd64/linkd" 755 usr/bin linkd 28 # multicall: linkd dispatches on basename(argv[0]) 29 for link in linkctl ifup ifdown ifquery ifreload; do 30 ln -sfn linkd "${DESTDIR}/usr/bin/${link}" 31 done 32 vinstall ${FILESDIR}/linkd-run 755 etc/sv/linkd run 33 vinstall ${FILESDIR}/linkd-check 755 etc/sv/linkd check 34 vinstall ${FILESDIR}/linkd-log-run 755 etc/sv/linkd/log run 35 install -d "${DESTDIR}/var/log/linkd" 36 }