aports/main/lsof/APKBUILD
2025-07-01 10:40:32 +00:00

49 lines
1.3 KiB
Plaintext

# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=lsof
pkgver=4.99.5
pkgrel=0
pkgdesc="LiSt Open Files"
url="https://github.com/lsof-org/lsof"
arch="all"
license="custom"
makedepends="bash linux-headers perl"
subpackages="$pkgname-doc"
source="https://github.com/lsof-org/lsof/archive/$pkgver/lsof-$pkgver.tar.gz
hassecurity.patch
"
prepare() {
default_prepare
# This test is skipped on other architectures where unshare
# returns "Operation not permitted", but on ppc64le unshare
# returns "Function not implemented" causing a fail instead
case "$CARCH" in
ppc64le)
rm -v lib/dialects/linux/tests/case-20-mmap.bash
;;
esac
}
build() {
./Configure -n linux
make
}
check() {
(cd tests && ./Add2TestDB)
make check
}
package() {
install -Dm0755 lsof -t "$pkgdir"/usr/bin/
install -Dm0644 Lsof.8 "$pkgdir"/usr/share/man/man8/lsof.8
install -Dm0644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
}
sha512sums="
083ff93545e02ad6c71ca77fbe7f90b25f09a2630472558e09a7784316d74d36cac42e158596444e1a69ffb848f4dd4c7f0fbac63bd0c9d02adfe423a838034a lsof-4.99.5.tar.gz
379c24df3bcad88bd35c2d9331064312e9faa0e6426479b3e3d3edd377860007ba3af2a0b4b0b998f0146bfd7d067dc4ee7d6f32a6f5e352afc875f6298ab1c2 hassecurity.patch
"