updated on Fri Jan 20 20:16:25 UTC 2012
[aur-mirror.git] / p0f / PKGBUILD
blob5d258769b8961987dfea7da54350c6e5da55efa0
1 # Maintainer: Michal Zalewski <lcamtuf[at]coredump[dot]cx>
2 # Contributor: cbreaker <cbreaker[at]tlen[dot]pl>]
3 # Contributor: Tino Reichardt
5 _p0ftools=n # additional tools: p0f-client & p0f-sendsyn, write y if you want them to be added
6 _p0ftools6=n # additional tool: p0f-sendsyn6 (ipv6 p0f-sendsyn), write y if you want to add it into package
8 pkgname=p0f
9 pkgver=3.01b
10 pkgrel=2
11 pkgdesc="Purely passive TCP/IP traffic fingerprinting tool "
12 url="http://lcamtuf.coredump.cx/p0f3/"
13 arch=('x86_64' 'i686')
14 license=('GPLv3')
15 depends=('libpcap')
16 source=("http://lcamtuf.coredump.cx/p0f3/releases/$pkgname-$pkgver.tgz")
17 md5sums=('292683bafaa31a03b4739c4b5f96eef5')
19 build() {
20         cd "${srcdir}"
21         cd "${srcdir}/${pkgname}-${pkgver}"
22         sed -e 's/\/usr\/local\/include\//\/usr\/include\//g' -i build.sh
23         sed -e 's/\/usr\/local\/lib\//\/usr\/lib\//g' -i build.sh
24         sed -e 's/"p0f.fp"/"\/etc\/p0f\/p0f.fp"/g' -i config.h
25         make
27         ## additional tools
28         if [ $_p0ftools = "y" ]; then
29                 cd "${srcdir}/${pkgname}-${pkgver}/tools"
30                 make p0f-client
31                 make p0f-sendsyn
32         fi
33         if [ $_p0ftools6 = "y" ]; then
34                 cd "${srcdir}/${pkgname}-${pkgver}/tools"
35                 make p0f-sendsyn6
36         fi
39 package() {
40         cd "${srcdir}/${pkgname}-${pkgver}"
41         install -d -Dm755 ${pkgdir}/usr/sbin
42         install -d -Dm755 ${pkgdir}/etc/p0f
43         install -d -Dm755 ${pkgdir}/usr/share/licenses/${pkgname}
44         install -d -Dm755 ${pkgdir}/usr/share/doc/${pkgname}
46         install -m744 p0f ${pkgdir}/usr/sbin
47         install -m755 p0f.fp ${pkgdir}/etc/p0f
48         install -D -m644 docs/COPYING ${pkgdir}/usr/share/licenses/${pkgname}
49         install -D -m644 docs/README ${pkgdir}/usr/share/doc/${pkgname}
51         ## additional tools
52         if [ $_p0ftools = "y" ]; then
53                 install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-client ${pkgdir}/usr/sbin
54                 install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-sendsyn ${pkgdir}/usr/sbin
55         fi
56         if [ $_p0ftools6 = "y" ]; then
57                 install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-sendsyn6 ${pkgdir}/usr/sbin
58         fi
60 warning "no man page available, README is at /usr/share/doc/${pkgname}/README"