# Contributor: Ɓukasz Jendrysik # Contributor: Jeremy Thomerson # Maintainer: Natanael Copa pkgname=wireshark pkgver=1.12.3 pkgrel=0 pkgdesc="A network protocol analyzer - GTK version" url="http://www.wireshark.org" arch="all" license="GPL2+" depends="" makedepends="bison flex perl glib glib-dev pkgconfig libpcap-dev libcap-dev gtk+3.0-dev c-ares-dev pcre-dev gnutls-dev libgcrypt-dev openssl-dev libnl3-dev qt5-qtbase-dev bash" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-common tshark" source="http://www.wireshark.org/download/src/$pkgname-$pkgver.tar.bz2" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case "$i" in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-ssl \ --with-gnutls \ || return 1 make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install install_desktop_files || return 1 find "$pkgdir" -name '*.la' -delete } common() { local i pkgdesc="network protoccol analyzer - common files" mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share \ "$subpkgdir"/usr/bin mv "$pkgdir"/etc "$subpkgdir"/ mv "$pkgdir"/usr/share/wireshark "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/lib/* "$subpkgdir"/usr/lib/ # move all bins except wireshark for i in "$pkgdir"/usr/bin/*; do case "$i" in */tshark|*/wireshark|*-qt) continue;; esac mv "$i" "$subpkgdir"/usr/bin/ done } tshark() { pkgdesc="network protoccol analyzer - console version" install -d "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/tshark "$subpkgdir"/usr/bin/tshark } qt() { pkgdesc="wireshark - Qt GUI" install -d "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/wireshark-qt "$subpkgdir"/usr/bin/ } md5sums="e6318b8451d4e56d39bd911da296ef19 wireshark-1.12.3.tar.bz2" sha256sums="69950b9dcb1a630982b5f680554d73d27ee0dc856fc6aeef88c8d04eb5ac33ea wireshark-1.12.3.tar.bz2" sha512sums="370ae828a638edac378242a996b0279747a2f54689387fe415f1f66e267a4b52c71a1a369755f3eaa6a2db0e970913dab0b5d3704af3461aa9d7d64abb3a49c6 wireshark-1.12.3.tar.bz2"