summaryrefslogtreecommitdiffstats
path: root/abs/core/lsof/PKGBUILD
blob: 7d25f4cf3e7c77b872ea428aaf671e5f6c81c4cb (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
# $Id$
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Jochem Kossen <j.kossen@home.nl>

pkgname=lsof
pkgver=4.89
pkgrel=1
pkgdesc="Lists open files for running Unix processes"
arch=('i686' 'x86_64')
url="http://people.freebsd.org/~abe/"
license=('custom')
depends=('glibc')
source=(ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/lsof_$pkgver.tar.bz2
        license.txt)
sha1sums=('ea8fb2588c9732f1b22d73ffab17dd055590df2c'
          'db6b6d90ce895e4053f91ad25c7761fbf9a37dd6')
#validpgpkeys=(9AFD62A840BD3D55) It is PGP-2 key

prepare() {
	cd lsof_$pkgver
	tar xf lsof_${pkgver}_src.tar
	cd lsof_${pkgver}_src
	sed -i 's|/\* #define\tHASSECURITY\t1 \*/|#define\tHASSECURITY\t1|' dialects/linux/machine.h
}

build() {
	cd lsof_$pkgver/lsof_${pkgver}_src
	./Configure -n linux
	make 
}

check() {
	cd lsof_$pkgver/lsof_${pkgver}_src/tests
	sed 's/END=0/exit 0/' -i CkTestDB
	make all
}

package() {
	cd lsof_$pkgver/lsof_${pkgver}_src

	install -Dm0755 lsof "$pkgdir"/usr/bin/lsof 
	install -Dm0644 lsof.8 "$pkgdir"/usr/share/man/man8/lsof.8 
   
	install -D -m0644 "$srcdir"/license.txt \
	     "$pkgdir"/usr/share/licenses/lsof/LICENSE 
}