aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsof/APKBUILD
blob: f26588e788e15acba152819429831ad7fd659eaa (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
40
41
42
43
44
45
46
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsof
pkgver=4.89
pkgrel=1
pkgdesc="LiSt Open Files"
url="https://people.freebsd.org/~abe/"
arch="all"
license="custom"
subpackages="$pkgname-doc"
depends=
makedepends="linux-headers"
source="http://distfiles.alpinelinux.org/distfiles/${pkgname}_$pkgver.tar.bz2"

_builddir="$srcdir"/${pkgname}_${pkgver}/${pkgname}_${pkgver}_src

prepare() {
	# theres a tarball in teh tarball...
	cd "$srcdir"/${pkgname}_${pkgver}
	tar -xf ${pkgname}_${pkgver}_src.tar

	cd "$_builddir"
	sed -e "s|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|" \
		-i dialects/linux/machine.h

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build () {
	cd "$_builddir"
	./Configure -n linux
	make || return 1
}

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
}
md5sums="1b9cd34f3fb86856a125abbf2be3a386  lsof_4.89.tar.bz2"
sha256sums="81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718  lsof_4.89.tar.bz2"
sha512sums="cafb0209143c7863e5cebe7efc33a2520d36f9e26222350e4edfa18debbcfb5c81f42f71469e5913fb21f49a7562bbe761b72dfc8f297dadf75ac619cdcb318c  lsof_4.89.tar.bz2"