summaryrefslogtreecommitdiff
path: root/community/ettercap/PKGBUILD
blob: a24c74cdaffd0de52b7749bcf03953a8b453384f (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
71
72
73
# $Id: PKGBUILD 87630 2013-04-04 10:17:39Z jelle $
# Maintainer:
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgbase=ettercap
pkgname=('ettercap' 'ettercap-gtk')
pkgver=0.7.6
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://ettercap.github.com/ettercap/"
license=('GPL')
depends=('openssl' 'libpcap' 'pcre' 'libltdl' 'libnet')
makedepends=('ghostscript' 'cmake' 'libpcap' 'libltdl' 'libnet' 'gtk2')
options=('!libtool' '!makeflags' '!emptydirs')
source=("https://github.com/Ettercap/ettercap/archive/v$pkgver.tar.gz" "ettercap.desktop" "org.archlinux.pkexec.ettercap.policy")
md5sums=('7c5f5e1fd4002afdfd13765ef92866e1')
build() {
  cd "${srcdir}"

  cp -r ${pkgbase}-${pkgver} ${pkgbase}-${pkgver}-gtk

  cd ${pkgbase}-${pkgver}
  mkdir build
  cd build
  cmake -D ENABLE_GTK=OFF -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=RELEASE ../
  make

  cd "$srcdir"/${pkgbase}-${pkgver}-gtk
  mkdir build
  cd build
  cmake -D ENABLE_GTK=ON -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=RELEASE ../
  make
}

package_ettercap() {
  pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - console"
  backup=('etc/ettercap/etter.conf')
  conflicts=('ettercap-gtk')

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

package_ettercap-gtk() {
  pkgdesc="A network sniffer/interceptor/logger for ethernet LANs - GTK frontend"
  depends+=('gtk2')
  backup=('etc/ettercap/etter.conf')
  conflicts=('ettercap')
  provides=('ettercap')
#install='ettercap-gtk.install'

  install -d $pkgdir/usr/share/polkit-1/actions/
  cd "${srcdir}"/${pkgbase}-${pkgver}-gtk/build
  make DESTDIR="${pkgdir}" install

#  install -Dm644 "${srcdir}/ettercap.desktop" "${pkgdir}/usr/share/applications/ettercap.desktop"
#  install -Dm644 "${srcdir}/${pkgbase}-${pkgver}-gtk/desktop/ettercap.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/ettercap.svg"

  # Install policy file
#  install -Dm644 "${srcdir}/org.archlinux.pkexec.ettercap.policy" "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.ettercap.policy"

  # We need rename the original script
#  mv "${pkgdir}/usr/bin/ettercap" "${pkgdir}/usr/bin/ettercap.elf"

  # Install launcher script
#  echo '#!/bin/sh' > ${pkgdir}/usr/bin/ettercap
#echo 'pkexec --disable-internal-agent "/usr/bin/ettercap.elf" "$@"' >> ${pkgdir}/usr/bin/ettercap
#  chmod 755 ${pkgdir}/usr/bin/ettercap

}
md5sums=('7c5f5e1fd4002afdfd13765ef92866e1'
         '21fe8aee8c7eb34bd5757a4de485ca06'
         'd20a6137008edd3fae01757cb193b870')