blob: ff7b39d7f7a3d084e87c6843ab7a55d900bdebb0 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: Rafal Michalski <plum.michalski@gmail.com>, Thomas Laroche <tho.laroche@gmail.com>
# https sites display mostly garbage, as they should. Try http sites.
# The XFCE Terminal is more tolerant of the control characters than PuTTY.
set -u
pkgname='justniffer'
pkgver='0.5.15'
pkgrel='1'
pkgdesc='TCP sniffer. It reassembles and reorders packets and displays the tcp flow in a customizable way.'
arch=('i686' 'x86_64')
url='http://justniffer.sourceforge.net'
license=('GPL')
depends=('python2>=2.4' 'libpcap' 'boost') # 'libnids' the package includes its own custom version of libnids
# I suspect python2 is a makedepends. No python code goes into the package.
_verwatch=('https://sourceforge.net/projects/justniffer/files/' "\s\+${pkgname}_\([0-9.]\+\)\.tar\.gz" 'f')
source=("https://sourceforge.net/projects/${pkgname}/files/${pkgname}_${pkgver}.tar.gz")
sha256sums=('d1ad84933cceda842e6b9b2f34891daa69279b643bd346f9e4778910eba50bf6')
prepare() {
set -u
cd "${pkgname}-${pkgver}"
rm -rf '.svn'
#Use python 2.x instead of 3.x
sed -i -e 's/python/python2/' python/*.py
sed -i -e 's/python/python2/' 'python/justniffer-grab-http-traffic.in'
sed -i -e 's/do_subst = python/do_subst = python2/' python/Makefile.*
# The behaviour of inline is no longer compatible with the included libnids so we take them out (0.5.12)
sed -i -e 's/^inline int/int/g' 'lib/libnids-1.21_patched/src/'{util.c,util.h}
# This fixes the i686 version
sed -i -e 's/^inline / /g' 'lib/libnids-1.21_patched/src/checksum.c'
#Unpatch the non working inline patch for GCC5 (0.5.14, 0.5.15)
sed -i -e 's:__GNUC__>=5:0:g' 'lib/libnids-1.21_patched/src/util.h'
sed -i -e 's:__GNUC__<5:1:g' 'lib/libnids-1.21_patched/src/util.c'
sed -i -e '/^ACLOCAL_AMFLAGS =/d' 'Makefile.am'
rm -rf 'm4/' # http://stackoverflow.com/questions/3096989/libtool-version-mismatch-error
mkdir 'm4'
autoreconf --force --install
CPPFLAGS='-P' CXXFLAGS='-O2' CFLAGS='-O2' LDFLAGS='-Wl,-z,defs' \
./configure --enable-dependency-tracking --enable-python --prefix='/usr' --sbindir='/usr/bin' PYTHON='python2'
set +u
}
build() {
set -u
cd "${pkgname}-${pkgver}"
#local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
make -s # -j "${_nproc}" # Too small
set +u
}
package() {
set -u
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
set +u
}
set +u
# vim:set ts=2 sw=2 et:
|