summaryrefslogtreecommitdiff
path: root/extra/ettercap/PKGBUILD
blob: 5924d10c73ddc18de1f2f6d794bf9cdbcd3bea73 (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
67
68
69
70
# $Id: PKGBUILD 137345 2011-09-07 13:18:49Z andrea $
# Maintainer:
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgbase=ettercap
pkgname=('ettercap' 'ettercap-gtk')
pkgver=NG_0.7.4.1
_origver=${pkgver/_/-}
pkgrel=2
arch=('i686' 'x86_64')
url="http://ettercap.sourceforge.net/"
license=('GPL')
depends=('ncurses' 'openssl' 'libpcap' 'zlib' 'pcre' 'libtool' 'libnet'
         'pkgconfig' 'gtk2')
source=("http://drizztbsd.github.com/${pkgbase}/dist/${pkgbase}-${_origver}.tar.gz"
        'ettercap.desktop')
md5sums=('c6ae5f86361a85a8e193051f594a74fa'
         '2fb9c1fa838f33aab427865ae4fc93ac')

build() {
  cd "${srcdir}"
  
  cp -r ${pkgbase}-${_origver} ${pkgbase}-${_origver}-gtk

  cd ${pkgbase}-${_origver}
  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --mandir=/usr/share/man \
              --datarootdir=/usr/share \
              --enable-plugins \
              --enable-https \
              --disable-gtk
  make

  cd ../${pkgbase}-${_origver}-gtk
  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --mandir=/usr/share/man \
              --datarootdir=/usr/share \
              --enable-plugins \
              --enable-https \
              --enable-gtk
  make
}

package_ettercap() {
  pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - console"
  depends=('ncurses' 'openssl' 'libpcap' 'zlib' 'pcre' 'libtool' 'libnet')
  backup=('etc/etter.conf')
  options=('!libtool')

  cd "${srcdir}"/${pkgbase}-${_origver}
  make DESTDIR="${pkgdir}" install
}

package_ettercap-gtk() {
  pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - GTK"
  depends=('ettercap' 'gtk2')
  optdepends=('gksu: to run ettercap from the menu')
  install=ettercap-gtk.install

  cd "${srcdir}"/${pkgbase}-${_origver}-gtk
  install -Dm755 src/ettercap "${pkgdir}"/usr/bin/ettercap-gtk
  install -Dm644 "${srcdir}"/ettercap.desktop \
    "${pkgdir}"/usr/share/applications/ettercap.desktop
  install -Dm644 share/ettercap.png \
    "${pkgdir}"/usr/share/ettercap/ettercap.png
  install -Dm644 desktop/ettercap.xpm \
    "${pkgdir}"/usr/share/pixmaps/ettercap.xpm
}