Created
September 12, 2017 18:35
-
-
Save anatol/68be5bf77f675727e71cb232d19a614c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Id: PKGBUILD 256714 2017-09-09 22:42:50Z anatolik $ | |
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com> | |
# Contributor: Guillaume ALAUX <guillaume@archlinux.org> | |
# Contributor: Florian Pritz <bluewind at jabber dot ccc dot de> | |
pkgname=('wireshark-cli' 'wireshark-common' 'wireshark-gtk' 'wireshark-qt') | |
pkgbase=wireshark | |
pkgver=2.4.1 | |
pkgrel=2 | |
arch=('i686' 'x86_64') | |
license=('GPL2') | |
makedepends=('c-ares' 'geoip' 'qt5-tools' 'qt5-multimedia' 'gtk3' 'krb5' 'libpcap' 'bash' 'libssh' | |
'gnutls' 'portaudio' 'lua52' 'python' 'cmake' 'ninja' 'perl-parse-yapp') | |
options=(!emptydirs) | |
url='https://www.wireshark.org/' | |
source=(https://www.wireshark.org/download/src/${pkgbase}-${pkgver}.tar.xz | |
do_not_use_svn_version.patch) | |
sha256sums=('02ddbcf9b10f9dfa1e36eec00fe00cb5b5ce8e07203843baf056ac7909911fcd' | |
'3981bb46f592e319f9c679c5e215ae0af828044a3b64d49d2cf0305ecacf4691') | |
prepare() { | |
cd ${pkgbase}-${pkgver} | |
# Avoid ugly "svn rev unknown from unknown" version string | |
patch -p1 < "$srcdir"/do_not_use_svn_version.patch | |
} | |
build() { | |
cd ${pkgbase}-${pkgver} | |
mkdir -p build | |
cd build | |
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |
-DBUILD_wireshark_gtk=ON \ | |
-DBUILD_tfshark=ON \ | |
-DBUILD_corbaidl2wrs=ON | |
ninja | |
} | |
package_wireshark-cli() { | |
pkgdesc='a free network protocol analyzer for Unix/Linux and Windows - CLI version' | |
depends=('c-ares' 'geoip' 'krb5' 'libgcrypt' 'libcap' 'libpcap' 'gnutls' 'glib2' 'lua52' 'libssh' 'libnghttp2' 'libxml2') | |
install=wireshark.install | |
conflicts=(wireshark) | |
cd ${pkgbase}-${pkgver}/build | |
DESTDIR="${pkgdir}" ninja install | |
rm -rf "#{pkgdir}"/usr/share/{icons,mime,appdata,applications}/ | |
#wireshark uid group is 150 | |
chgrp 150 "${pkgdir}/usr/bin/dumpcap" | |
chmod 754 "${pkgdir}/usr/bin/dumpcap" | |
# Headers | |
#install -dm755 "${pkgdir}"/usr/include/${pkgbase}/{epan/{crypt,dfilter,dissectors,ftypes,wmem},wiretap,wsutil} | |
#install -m644 config.h register.h ws_diag_control.h ws_symbol_export.h "${pkgdir}/usr/include/${pkgbase}" | |
#for d in epan epan/crypt epan/dfilter epan/dissectors epan/ftypes epan/wmem wiretap wsutil; do | |
# install -m644 ${d}/*.h "${pkgdir}"/usr/include/${pkgbase}/${d} | |
#done | |
} | |
package_wireshark-common() { | |
pkgdesc='Common files used by wireshark-gtk and wireshark-qt' | |
cd ${pkgbase}-${pkgver}/build | |
DESTDIR="${pkgdir}" ninja install | |
#rm "${pkgdir}"/usr/share/applications/wireshark{,-gtk}.desktop | |
} | |
package_wireshark-gtk() { | |
pkgdesc='a free network protocol analyzer for Unix/Linux and Windows - GTK frontend' | |
depends=('gtk3' 'portaudio' 'wireshark-cli' 'wireshark-common') | |
replaces=(wireshark) | |
conflicts=(wireshark) | |
cd ${pkgbase}-${pkgver}/build | |
install -Dm644 run/wireshark-gtk "${pkgdir}/usr/bin/wireshark-gtk" | |
install -Dm644 ../wireshark-gtk.desktop "${pkgdir}/usr/share/applications/wireshark-gtk.desktop" | |
} | |
package_wireshark-qt() { | |
pkgdesc='a free network protocol analyzer for Unix/Linux and Windows - Qt frontend' | |
depends=('qt5-multimedia' 'wireshark-cli' 'wireshark-common') | |
cd ${pkgbase}-${pkgver}/build | |
install -Dm644 run/wireshark "${pkgdir}/usr/bin/wireshark" | |
install -Dm644 ../wireshark.desktop "${pkgdir}/usr/share/applications/wireshark.desktop" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment