# Maintainer: Levente Polyak # Contributor: Timothy Redaelli # Contributor: Guillaume ALAUX # Contributor: Florian Pritz # Contributor: Peter Wu pkgbase=wireshark pkgname=('wireshark-cli' 'wireshark-qt') pkgver=3.0.0 pkgrel=1 pkgdesc='Network traffic and protocol analyzer/sniffer' url='https://www.wireshark.org/' arch=('x86_64') license=('GPL2') makedepends=('cmake' 'ninja' 'c-ares' 'libmaxminddb' 'qt5-tools' 'qt5-svg' 'qt5-multimedia' 'krb5' 'libpcap' 'libssh' 'bcg729' 'libxml2' 'libnghttp2' 'snappy' 'lz4' 'bcg729' 'spandsp' 'gnutls' 'lua52' 'python' 'desktop-file-utils' 'hicolor-icon-theme') options=('!emptydirs') source=(https://www.wireshark.org/download/src/${pkgbase}-${pkgver}.tar.xz wireshark.sysusers) sha512sums=('917708b5edc25609536c7bd7cf4ae32a901fd99118302138dc0bf6f1ad092a8e5069a917cc8cf6cb77190f54e50623a4eba1ee10ffc225ee3051b50cf02a0963' '3956c1226e64f0ce4df463f80b55b15eed06ecd9b8703b3e8309d4236a6e1ca84e43007336f3987bc862d8a5e7cfcaaf6653125d2a34999a0f1357c52e7c4990') build() { cd ${pkgbase}-${pkgver} cmake . -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib ninja } package_wireshark-cli() { pkgdesc+=' - CLI tools and data files' depends=('c-ares' 'libmaxminddb' 'krb5' 'libgcrypt' 'libcap' 'libpcap' 'gnutls' 'glib2' 'lua52' 'libssh' 'libxml2' 'libnghttp2' 'snappy' 'lz4' 'bcg729' 'spandsp') install=wireshark.install conflicts=(wireshark) cd ${pkgbase}-${pkgver} DESTDIR="${pkgdir}" ninja install # wireshark uid group is 150 install -Dm644 "${srcdir}/wireshark.sysusers" "${pkgdir}/usr/lib/sysusers.d/wireshark.conf" chgrp 150 "${pkgdir}/usr/bin/dumpcap" chmod 754 "${pkgdir}/usr/bin/dumpcap" rm "${pkgdir}/usr/bin/wireshark" rm "${pkgdir}/usr/share/applications/wireshark.desktop" rm "${pkgdir}/usr/share/appdata/wireshark.appdata.xml" rm -rf "${pkgdir}/usr/share/mime" rm "${pkgdir}/usr/share/man/man1/wireshark.1" } package_wireshark-qt() { pkgdesc+=' - Qt GUI' depends=('desktop-file-utils' 'qt5-multimedia' 'qt5-svg' 'wireshark-cli' 'shared-mime-info' 'xdg-utils') replaces=(wireshark wireshark-gtk) conflicts=(wireshark wireshark-gtk) cd ${pkgbase}-${pkgver} install -Dm 755 run/wireshark "${pkgdir}/usr/bin/wireshark" install -Dm 644 wireshark.desktop -t "${pkgdir}/usr/share/applications" install -Dm 644 doc/wireshark.1 -t "${pkgdir}/usr/share/man1" install -Dm 644 wireshark.appdata.xml -t "${pkgdir}/usr/share/appdata" install -Dm 644 wireshark-mime-package.xml "${pkgdir}/usr/share/mime/packages/wireshark.xml" } # vim: ts=2 sw=2 et: