aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsof/APKBUILD
blob: 07652bdcff51b3eeba446d0542d17eee33ed022a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsof
pkgver=4.91
pkgrel=0
pkgdesc="LiSt Open Files"
url="https://people.freebsd.org/~abe"
arch="all"
license="custom"
subpackages="$pkgname-doc"
makedepends="linux-headers"
source="https://fossies.org/linux/misc/${pkgname}_${pkgver}_src.tar.xz"
builddir="$srcdir/${pkgname}_${pkgver}_src"

prepare() {
	default_prepare
	cd "$builddir"

	sed -i "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \
		dialects/linux/machine.h
	sed -n 6,30p lsof.h > COPYING
}

build () {
	cd "$builddir"

	./Configure -n linux
	make
}

package() {
	cd "$builddir"

	install -D -m0755 -o root -g root lsof "$pkgdir"/usr/bin/lsof
	install -D -m0644 -o root -g root lsof.8 \
		"$pkgdir"/usr/share/man/man8/lsof.8
	install -D -m644 COPYING "$pkgdir"/usr/share/licenses/lsof/COPYING
}

sha512sums="d6b378d65152708aa255a74a8bfc8c07ecf923aa4ef02212f7b2af6cb31394f3c11980e1b197cbc47e1b1881d3024a542982c3f67605d8bbb60e1c3df4fb3608  lsof_4.91_src.tar.xz"