diff options
author | Bruno Miguel Fernandes Silva | 2019-05-17 12:30:41 +0100 |
---|---|---|
committer | Bruno Miguel Fernandes Silva | 2019-05-17 12:30:41 +0100 |
commit | 6593d1ad3308d9af4a4385258fd7825fd75b4fa7 (patch) | |
tree | e9ead7fd3f80b2f52f6b8fa0b2261dc0fc12f497 | |
download | aur-6593d1ad3308d9af4a4385258fd7825fd75b4fa7.tar.gz |
First commit
-rw-r--r-- | .SRCINFO | 80 | ||||
-rw-r--r-- | PKGBUILD | 89 | ||||
-rw-r--r-- | wireshark.install | 8 | ||||
-rw-r--r-- | wireshark.sysusers | 1 |
4 files changed, 178 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c7819ffe001e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,80 @@ +pkgbase = wireshark + pkgdesc = Network traffic and protocol analyzer/sniffer + pkgver = v2.9.0rc0.r2721.g4b4f4df18d + pkgrel = 1 + url = https://www.wireshark.org/ + arch = x86_64 + license = GPL2 + makedepends = cmake + makedepends = ninja + makedepends = c-ares + makedepends = libmaxminddb + makedepends = qt5-tools + makedepends = qt5-svg + makedepends = qt5-multimedia + makedepends = krb5 + makedepends = libpcap + makedepends = libssh + makedepends = libxml2 + makedepends = libnghttp2 + makedepends = snappy + makedepends = lz4 + makedepends = spandsp + makedepends = gnutls + makedepends = lua52 + makedepends = python + makedepends = libcap + makedepends = glib2 + makedepends = libgcrypt + makedepends = sbc + makedepends = bcg729 + makedepends = desktop-file-utils + makedepends = hicolor-icon-theme + options = !emptydirs + source = wireshark::git+https://github.com/YannGarcia/wireshark-for-ITS.git#branch=ITS_Protocol_Support + source = wireshark.sysusers + sha512sums = SKIP + sha512sums = 3956c1226e64f0ce4df463f80b55b15eed06ecd9b8703b3e8309d4236a6e1ca84e43007336f3987bc862d8a5e7cfcaaf6653125d2a34999a0f1357c52e7c4990 + +pkgname = wireshark-cli-its + pkgdesc = Network traffic and protocol analyzer/sniffer - CLI tools and data files + install = wireshark.install + depends = c-ares + depends = libmaxminddb + depends = krb5 + depends = libgcrypt + depends = libcap + depends = libpcap + depends = gnutls + depends = glib2 + depends = lua52 + depends = libssh + depends = libxml2 + depends = libnghttp2 + depends = snappy + depends = lz4 + depends = spandsp + depends = sbc + depends = bcg729 + conflicts = wireshark + conflicts = wireshark-cli + replaces = wireshark-cli + +pkgname = wireshark-qt-its + pkgdesc = Network traffic and protocol analyzer/sniffer - Qt GUI + depends = desktop-file-utils + depends = qt5-multimedia + depends = qt5-svg + depends = wireshark-cli-its + depends = shared-mime-info + depends = hicolor-icon-theme + depends = xdg-utils + conflicts = wireshark + conflicts = wireshark-gtk + conflicts = wireshark-common + conflicts = wireshark-qt + replaces = wireshark + replaces = wireshark-gtk + replaces = wireshark-common + replaces = wireshark-qt + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c8ea27fb20ff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,89 @@ +# Maintainer: Bruno Silva <brunofernandes at ua dot pt> + +pkgbase=wireshark +pkgname=('wireshark-cli-its' 'wireshark-qt-its') +pkgver=v2.9.0rc0.r2721.g4b4f4df18d +pkgrel=1 +pkgdesc='Network traffic and protocol analyzer/sniffer with ITS (Intelligent Transportation System) plugins' +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' 'libxml2' 'libnghttp2' + 'snappy' 'lz4' 'spandsp' 'gnutls' 'lua52' 'python' 'libcap' + 'glib2' 'libgcrypt' 'sbc' 'bcg729' 'desktop-file-utils' + 'hicolor-icon-theme') +options=('!emptydirs') +source=(${pkgbase}::git+https://github.com/YannGarcia/wireshark-for-ITS.git#branch=ITS_Protocol_Support + wireshark.sysusers) +sha512sums=('SKIP' + '3956c1226e64f0ce4df463f80b55b15eed06ecd9b8703b3e8309d4236a6e1ca84e43007336f3987bc862d8a5e7cfcaaf6653125d2a34999a0f1357c52e7c4990') + +pkgver() { + cd "${pkgbase}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + cd ${pkgbase} + pwd + egrep -nr -lRZ '"Do not treat warnings as errors" OFF' | xargs -0 -l sed -i -e 's/"Do not treat warnings as errors" OFF/"Do not treat warnings as errors" ON/g' + cmake . -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_RPATH= \ + -DCMAKE_SKIP_RPATH=ON + egrep -nr -lRZ '"Do not treat warnings as errors" ON' | xargs -0 -l sed -i -e 's/"Do not treat warnings as errors" ON/"Do not treat warnings as errors" OFF/g' + ninja +} + +package_wireshark-cli-its() { + pkgdesc+=' - CLI tools and data files' + depends=('c-ares' 'libmaxminddb' 'krb5' 'libgcrypt' 'libcap' 'libpcap' + 'gnutls' 'glib2' 'lua52' 'libssh' 'libxml2' 'libnghttp2' 'snappy' + 'lz4' 'spandsp' 'sbc' 'bcg729') + install=wireshark.install + conflicts=(wireshark wireshark-cli) + replaces=(wireshark-cli) + + cd ${pkgbase} + DESTDIR="${pkgdir}" ninja install + + # wireshark uid group is 150 + install -Dm 644 "${srcdir}/wireshark.sysusers" "${pkgdir}/usr/lib/sysusers.d/wireshark.conf" + chgrp 150 "${pkgdir}/usr/bin/dumpcap" + chmod 754 "${pkgdir}/usr/bin/dumpcap" + + cd "${pkgdir}" + rm -r usr/share/mime \ + usr/share/icons \ + usr/share/man/man1/wireshark.1 \ + usr/bin/wireshark \ + usr/share/applications/wireshark.desktop \ + usr/share/appdata/wireshark.appdata.xml +} + +package_wireshark-qt-its() { + pkgdesc+=' - Qt GUI' + depends=('desktop-file-utils' 'qt5-multimedia' 'qt5-svg' 'wireshark-cli-its' + 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils') + replaces=(wireshark wireshark-gtk wireshark-common wireshark-qt) + conflicts=(wireshark wireshark-gtk wireshark-common wireshark-qt) + + cd ${pkgbase} + install -d "${srcdir}/staging" + DESTDIR="${srcdir}/staging" ninja install + + install -Dm 755 run/wireshark -t "${pkgdir}/usr/bin" + install -Dm 644 wireshark.desktop -t "${pkgdir}/usr/share/applications" + install -Dm 644 doc/wireshark.1 -t "${pkgdir}/usr/share/man/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" + mv "${srcdir}/staging/usr/share/icons" "${pkgdir}/usr/share/icons" +} + +# vim: ts=2 sw=2 et: diff --git a/wireshark.install b/wireshark.install new file mode 100644 index 000000000000..6eabd1bc9fa6 --- /dev/null +++ b/wireshark.install @@ -0,0 +1,8 @@ +post_install() { + post_upgrade + echo "NOTE: To run wireshark as normal user you have to add yourself into wireshark group" +} + +post_upgrade() { + setcap cap_net_raw,cap_net_admin,cap_dac_override+eip usr/bin/dumpcap +} diff --git a/wireshark.sysusers b/wireshark.sysusers new file mode 100644 index 000000000000..0337b2eee0ae --- /dev/null +++ b/wireshark.sysusers @@ -0,0 +1 @@ +g wireshark 150 - - |