# Contributor: Jeremy Thomerson # Maintainer: Natanael Copa pkgname=wireshark pkgver=1.10.2 pkgrel=1 pkgdesc="network protocol analyzer - GTK version" url="http://www.wireshark.org" arch="all" license="GPLv2" depends="bash" makedepends="bison flex perl glib glib-dev pkgconfig libpcap-dev libcap-dev gtk+-dev c-ares-dev pcre-dev gnutls-dev libgcrypt-dev openssl-dev libnl3-dev" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-common tshark" source="http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.bz2 wireshark-0013-dirent-symbols-clash.patch wireshark.desktop wireshark.png" prepare() { cd "$srcdir"/$pkgname-$pkgver for i in $source; do case "$i" in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$srcdir"/$pkgname-$pkgver ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-ssl \ --with-gnutls \ --disable-text2pcap \ --disable-dftest \ --disable-randpkt \ || return 1 make } package() { cd "$srcdir"/$pkgname-$pkgver make -j1 DESTDIR="$pkgdir" install install -Dm644 "$srcdir"/wireshark.png \ "$pkgdir"/usr/share/icons/wireshark.png install -Dm644 "$srcdir"/wireshark.desktop \ "$pkgdir"/usr/share/applications/wireshark.desktop 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) 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 } md5sums="cd7fedd0a67df5ad4905fd356efdc1e8 wireshark-1.10.2.tar.bz2 ba36dc72f90395b6296d4612d3a083da wireshark-0013-dirent-symbols-clash.patch 504ede44c02b2a52f6cbd3bffdf93b8d wireshark.desktop e771800a8c977fe223583a453bc27397 wireshark.png" sha256sums="b7a83314424e13639c591de924aa240bc5f3d9cae01dde69bf858fa04b22a33d wireshark-1.10.2.tar.bz2 73a697282e2c0111c6b6f8f049f8ff6b7582848c6b7eff38cfcf21875e85eacf wireshark-0013-dirent-symbols-clash.patch 10c8b5bdd1d161454c93df166f39b2bae72efe6021beb61d84dd65dc329260fe wireshark.desktop a9f6d78dd64a87acd1b600222156b9fc26e7ccbbc43fc77c1da138908bdb2d3c wireshark.png" sha512sums="fd2ad466b122e2044718d8b42d0b323293d2e7fe04af700a1e94d00c720f78ba664e9cdb9a7fb35a13a6f7d99d81e4345482ee8d98b7538972a3f23250a44702 wireshark-1.10.2.tar.bz2 05e3dc4439e2c1fd32af2592a2983f1b95c289e9dbea51e171200a9da897ea63982951bde2f319c4e309bb804f06ceadc1406c2fae616b9ac80175a95c67e55a wireshark-0013-dirent-symbols-clash.patch 6e1eab7793a97377017be9126b7d25bd9c10d2b0e06be1e83e66ac2ea64dce5c4f8f7783d483921867241d298eb0ac82ff3f9910e90c2065125bff9a3856f52e wireshark.desktop b421575dbc3d496a8c3d5485929c161c06d3403bff2fef4f1db07b1db729ca173c6e89cb648d127c02800359975d5e0880c344dc58fa9d24dde570a862bdd7d4 wireshark.png"