summaryrefslogtreecommitdiff
path: root/community/dsniff/PKGBUILD
blob: e0a357243bd9075b5e5f4fb481fedeb74c90300f (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
# $Id: PKGBUILD 91568 2013-05-24 09:42:47Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: ViNS <gladiator@fastwebnet.it>

pkgname=dsniff
pkgver=2.4b1
pkgrel=22
pkgdesc="Collection of tools for network auditing and penetration testing"
url="http://www.monkey.org/~dugsong/dsniff/"
arch=('i686' 'x86_64' 'mips64el')
license=('BSD')
depends=('libpcap' 'openssl' 'libxmu' 'glib2' 'libnet' 'libnids')
source=("http://www.monkey.org/~dugsong/${pkgname}/beta/$pkgname-$pkgver.tar.gz"
        "http://ftp.de.debian.org/debian/pool/main/d/${pkgname}/${pkgname}_2.4b1+debian-18.diff.gz")
md5sums=('2f761fa3475682a7512b0b43568ee7d6'
         'fbc9f62f9ab2f98f24f53ad497c1ce5d')

prepare() {
  cd $srcdir/$pkgname-2.4
  patch -N < "${srcdir}"/dsniff_2.4b1+debian-18.diff
  for i in *.dpatch; do
    patch -N < "$i"
  done
  sed -i 's|${CC-cc} -E|${CC-cc} -O2 -E|g' configure
}

build() {
  cd $srcdir/$pkgname-2.4
  LDFLAGS="-lresolv -lglib-2.0 -lgthread-2.0 $LDFLAGS" ./configure \
    --prefix=/usr --sbindir=/usr/bin
  make -j1
}

package() {
  cd "$srcdir"/$pkgname-2.4
  make install_prefix="$pkgdir" install
  install -D -m0644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
  install -d "$pkgdir"/usr/share
  mv "$pkgdir"/usr/man "$pkgdir"/usr/share/
}