updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / loki / PKGBUILD
blob7e64f7ab9c44dca7ca4f7658c94d06f37e7c072a
1 # Contributor: fnord0 <fnord0 AT riseup DOT net>
2 pkgname=loki
3 pkgver=0.2.7
4 pkgrel=2
5 pkgdesc="Python based framework implementing many packet generation and attack modules for Layer 2 and 3 protocols"
6 arch=('i686' 'x86_64')
7 url="https://c0decafe.de/loki.html"
8 license=('BSD')
9 depends=('python2' 'pygtk' 'python2-ipy' 'dpkt-svn' 'pylibpcap' 'libdnet' 'libglade' 'autoconf' 'automake')
10 source=("https://c0decafe.de/${pkgname}/${pkgname}-${pkgver}.tar.gz")
11 md5sums=('31e849b6bb1d43444ecab972ef13e7db')
12 sha1sums=('42969aad191a5c62df141a4c5263786b033b37ef')
14 build() {
15         install -d ${pkgdir}/usr/bin || return 1
16         install -d ${pkgdir}/usr/share/${pkgname} || return 1
17         install -d ${pkgdir}/usr/share/licenses/${pkgname} || return 1
19         cd ${srcdir}/${pkgname}-${pkgver}
20         aclocal && automake --add-missing && autoconf || return 1
21         ./configure --prefix=/usr || return 1
22         grep -rl python ${srcdir}/${pkgname}-${pkgver}/ | xargs sed -i 's|python|python2|g' || return 1
25 package() {
26         cd ${srcdir}/${pkgname}-${pkgver}
27         make || return 1
28         make DESTDIR="${startdir}/pkg/" install || return 1
29         install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
30         install -Dm644 AUTHORS ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
31         install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
32         for doc in ChangeLog README REQUIREMENTS; do
33           install -Dm644 ${doc} ${pkgdir}/usr/share/${pkgname}/${doc} || return 1
34         done
36         #user notification
37         echo -e ""
38         echo -e "\e[1;31m[\e[0m\e[1;34m*\e[0m\e[1;31m]\e[0m \e[1;31mrun '\e[0m\e[1;34m/usr/bin/loki.py\e[0m\e[1;31m' to start LOKI\e[0m"
39         echo -e ""
40         echo -e "\e[1;34m>>>\e[0m \e[1;31mLOKI homepage @ \e[0m\e[1;32mhttps://www.c0decafe.de/loki.html\e[0m"
41         echo -e "\e[1;34m>>>\e[0m \e[1;31mLOKI demo @ \e[0m\e[1;32mhttps://www.c0decafe.de/loki/bh10-demos.tar.gz\e[0m"
42         echo -e ""
44 # vim:syntax=sh