aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsof/APKBUILD
blob: 1f03e7112bce28cc3534060041ebc9b54dc34100 (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
47
48
49
50
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsof
pkgver=4.88
pkgrel=0
pkgdesc="LiSt Open Files"
url="http://people.freebsd.org/~abe/"
arch="all"
license="custom"
subpackages="$pkgname-doc"
depends=
makedepends=""
source="ftp://sunsite.ualberta.ca/pub/Mirror/$pkgname/${pkgname}_$pkgver.tar.bz2
	fix-includes.patch"

_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/sbin/lsof
	install -D -m0644 -o root -g root lsof.8 \
		"$pkgdir"/usr/share/man/man8/lsof.8
}
md5sums="1b29c10db4aa88afcaeeaabeef6790db  lsof_4.88.tar.bz2
92f341e3bd0e942ad1bb5a8c39ea5989  fix-includes.patch"
sha256sums="fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b  lsof_4.88.tar.bz2
93aa0c02bd46a228a488daa9ba7a13f7b88f46cad244dc3a1ce798ab4285371e  fix-includes.patch"
sha512sums="acf3901ac08bac5acaa123af835de03fcf86c1cb851a2cba5bb6d08c53dff62570e4129c18ffa241ae84a83d5e6fc5207fb12e43b5ff5a21a0c1967ca117848b  lsof_4.88.tar.bz2
6022c79c3ddfeada603d7e88d22c0a3f60a09d42be9e3844d0d650b68761edcb12a20bd19e4b84342b3b2c1ac3d6c3b8690d81c9834301000734b71bc63cf63f  fix-includes.patch"