template (1598B)
1 # Template file for 'libmnl' 2 pkgname=libmnl 3 version=1.0.5 4 revision=5 5 short_desc="Minimalistic Netlink library" 6 maintainer="finwo <finwo@pm.me>" 7 license="LGPL-2.1-or-later" 8 homepage="https://www.netfilter.org/projects/libmnl/" 9 distfiles="https://www.netfilter.org/pub/libmnl/libmnl-1.0.5.tar.bz2" 10 checksum=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525 11 # glibc first: the post-install runs /sbin/ldconfig, which needs libc 12 # present. busybox first: control scripts run under /bin/sh, which must 13 # exist before the script executes (ordering, not just runtime truth - 14 # apk runs each package's scripts right after unpacking it). 15 depends="glibc busybox" 16 17 # Notes: 18 # - iproute2's `ip` builds without libmnl but loses extended-error-ack 19 # decoding (netlink error messages become opaque). On a netlink-driven 20 # NOS that is a debugging tax we refuse to pay; libmnl is tiny and 21 # dependency-free, so it is a real package, not vendored. 22 # - Shared-only per packages/README.md. Sysroot seed (second install + 23 # .pc prefix rewrite) so iproute2's configure finds it via PKG_CONFIG_PATH. 24 25 do_configure() { 26 cd "${WRKSRC}" 27 ./configure --prefix=/usr --disable-static 28 } 29 30 do_build() { 31 cd "${WRKSRC}" 32 make -j"$(nproc)" 33 } 34 35 do_install() { 36 cd "${WRKSRC}" 37 make install DESTDIR="${DESTDIR}" 38 make install DESTDIR="${SYSROOT}" 39 # .la files are build-time libtool metadata, never shipped 40 rm -f "${DESTDIR}"/usr/lib/*.la "${SYSROOT}"/usr/lib/*.la 41 # The sysroot .pc prefix is rewritten and verified centrally by mk/build.sh, 42 # which runs pc-fixup.sh after this function returns. 43 }