mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/p0f: new aport
Passive traffic fingerprinting tool http://lcamtuf.coredump.cx/p0f3/ [TT: modernize]
This commit is contained in:
parent
19bff561e3
commit
87d740c28e
35
testing/p0f/APKBUILD
Normal file
35
testing/p0f/APKBUILD
Normal file
@ -0,0 +1,35 @@
|
||||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer: Arch3y <arch3y@riseup.net>
|
||||
pkgname=p0f
|
||||
pkgver=3.09b
|
||||
pkgrel=0
|
||||
pkgdesc="Passive traffic fingerprinting tool"
|
||||
url="http://lcamtuf.coredump.cx/p0f3/"
|
||||
arch="all"
|
||||
license="GPL2"
|
||||
makedepends="bash libpcap-dev"
|
||||
subpackages="$pkgname-doc"
|
||||
source="http://lcamtuf.coredump.cx/p0f3/releases/$pkgname-$pkgver.tgz
|
||||
p0f-fixes.patch"
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
make
|
||||
cd tools
|
||||
make p0f-client p0f-sendsyn p0f-sendsyn6
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
install -Dm 755 p0f "$pkgdir/usr/bin/p0f"
|
||||
install -Dm 644 p0f.fp "$pkgdir/etc/p0f/p0f.fp"
|
||||
install -Dm 644 docs/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm 644 docs/README "${pkgdir}/usr/share/doc/${pkgname}/README"
|
||||
install -Dm 755 tools/p0f-client "$pkgdir/usr/bin"
|
||||
install -Dm 755 tools/p0f-sendsyn "$pkgdir/usr/bin"
|
||||
install -Dm 755 tools/p0f-sendsyn6 "$pkgdir/usr/bin"
|
||||
}
|
||||
|
||||
sha512sums="2a688baa865f27c91c023a7c53e530649f56a681e6ca2533152ab07b42883857b20c378b636e87dda8d1d5dfac17e426d09ee032b363d0b7d98e57a9ff6164d0 p0f-3.09b.tgz
|
||||
c5e236f6ca11274b636813509127ea57c2b0c4798f166e1f6a5edea31499eeaaccefe71aa44583925edd184f197ed63b1b0e01e7c7e598fd9e74ddd150583272 p0f-fixes.patch"
|
||||
42
testing/p0f/p0f-fixes.patch
Normal file
42
testing/p0f/p0f-fixes.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- p0f-3.09b.orig/build.sh
|
||||
+++ p0f-3.09b/build.sh
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
test "$CC" = "" && CC="gcc"
|
||||
|
||||
-BASIC_CFLAGS="-Wall -Wno-format -I/usr/local/include/ \
|
||||
+BASIC_CFLAGS="-Wall -Wno-format -I/usr/include/ \
|
||||
-I/opt/local/include/ -DVERSION=\"$VERSION\" $CFLAGS"
|
||||
|
||||
-BASIC_LDFLAGS="-L/usr/local/lib/ -L/opt/local/lib $LDFLAGS"
|
||||
+BASIC_LDFLAGS="-L/usr/lib/ -L/opt/local/lib $LDFLAGS"
|
||||
|
||||
-USE_CFLAGS="-fstack-protector-all -fPIE -D_FORTIFY_SOURCE=2 -g -ggdb \
|
||||
+USE_CFLAGS="-fstack-protector-all -fPIE -D_FORTIFY_SOURCE=2 \
|
||||
$BASIC_CFLAGS"
|
||||
|
||||
USE_LDFLAGS="-Wl,-z,relro -pie $BASIC_LDFLAGS"
|
||||
--- p0f-3.09b.orig/config.h
|
||||
+++ p0f-3.09b/config.h
|
||||
@@ -20,7 +20,7 @@
|
||||
/* Default location of p0f.fp: */
|
||||
|
||||
#ifndef FP_FILE
|
||||
-# define FP_FILE "p0f.fp"
|
||||
+# define FP_FILE "/etc/p0f/p0f.fp"
|
||||
#endif /* !FP_FILE */
|
||||
|
||||
/* Initial permissions on log files: */
|
||||
--- p0f-3.09b.orig/tools/Makefile
|
||||
+++ p0f-3.09b/tools/Makefile
|
||||
@@ -8,8 +8,8 @@
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -g -ggdb -Wall -Wno-format -funsigned-char
|
||||
-LDFLAGS =
|
||||
+CFLAGS = -Wall -Wno-format -funsigned-char
|
||||
+LDFLAGS =
|
||||
TARGETS = p0f-client p0f-sendsyn p0f-sendsyn6
|
||||
|
||||
all: $(TARGETS)
|
||||
@ -1,49 +0,0 @@
|
||||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer:
|
||||
pkgname=p0f
|
||||
pkgver=3.05b
|
||||
pkgrel=0
|
||||
pkgdesc="Passive traffic fingerprinting tool"
|
||||
url="http://lcamtuf.coredump.cx/p0f3/"
|
||||
arch="all"
|
||||
license="GPL"
|
||||
depends=
|
||||
depends_dev="bash libpcap-dev"
|
||||
makedepends="$depends_dev"
|
||||
install=
|
||||
subpackages="$pkgname-doc"
|
||||
source="http://lcamtuf.coredump.cx/p0f3/releases/$pkgname-$pkgver.tgz"
|
||||
|
||||
|
||||
_builddir="$srcdir"/$pkgname-$pkgver
|
||||
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
# apply patches here
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
make || return 1
|
||||
cd tools
|
||||
make p0f-client
|
||||
make p0f-sendsyn
|
||||
make p0f-sendsyn6
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
install -d -Dm755 ${pkgdir}/usr/sbin
|
||||
install -d -Dm755 ${pkgdir}/etc/p0f
|
||||
install -d -Dm755 ${pkgdir}/usr/share/licenses/${pkgname}
|
||||
install -d -Dm755 ${pkgdir}/usr/share/doc/${pkgname}
|
||||
install -m744 p0f ${pkgdir}/usr/sbin
|
||||
install -m755 p0f.fp ${pkgdir}/etc/p0f
|
||||
install -D -m644 docs/COPYING ${pkgdir}/usr/share/licenses/${pkgname}
|
||||
install -D -m644 docs/README ${pkgdir}/usr/share/doc/${pkgname}
|
||||
install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-client ${pkgdir}/usr/sbin
|
||||
install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-sendsyn ${pkgdir}/usr/sbin
|
||||
install -m744 ${srcdir}/${pkgname}-${pkgver}/tools/p0f-sendsyn6 ${pkgdir}/usr/sbin
|
||||
}
|
||||
|
||||
md5sums="edbc4b135b2646db3227a441268fd2e2 p0f-3.05b.tgz"
|
||||
Loading…
x
Reference in New Issue
Block a user