* add wireshark
This commit is contained in:
parent
c078dd993b
commit
c14e219be6
100
wireshark/PKGBUILD
Normal file
100
wireshark/PKGBUILD
Normal file
@ -0,0 +1,100 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
||||
# Maintainer: Filipe Laíns <lains@archlinux.org>
|
||||
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
|
||||
# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
|
||||
# Contributor: Florian Pritz <bluewind at jabber dot ccc dot de>
|
||||
# Contributor: Peter Wu <peter@lekensteyn.nl>
|
||||
|
||||
pkgbase=wireshark
|
||||
pkgname=('wireshark-cli' 'wireshark-qt')
|
||||
pkgver=3.4.2
|
||||
pkgrel=1
|
||||
pkgdesc='Network traffic and protocol analyzer/sniffer'
|
||||
url='https://www.wireshark.org/'
|
||||
arch=(x86_64 powerpc64le)
|
||||
license=('GPL2')
|
||||
makedepends=('glibc' 'cmake' 'ninja' 'c-ares' 'libmaxminddb' 'qt5-tools' 'qt5-svg'
|
||||
'qt5-multimedia' 'krb5' 'libpcap' 'libssh' 'libxml2' 'libnghttp2'
|
||||
'snappy' 'lz4' 'spandsp' 'gnutls' 'lua52' 'python' 'libcap' 'libnl'
|
||||
'glib2' 'libgcrypt' 'sbc' 'bcg729' 'desktop-file-utils' 'libxslt'
|
||||
'hicolor-icon-theme' 'zstd' 'zlib' 'gcc-libs' 'brotli' 'asciidoctor'
|
||||
'doxygen' 'minizip' 'speexdsp' 'opus')
|
||||
options=('!emptydirs')
|
||||
source=(https://www.wireshark.org/download/src/${pkgbase}-${pkgver}.tar.xz
|
||||
wireshark.sysusers)
|
||||
sha512sums=('38dc62d306dafe1a25db16ca28e1f4181a83673700a0b4c6dd98c8cb27df51ad0c6414db0370c443250aeb2521eceefb183178fe7d23a11b697cbf3f5b06f53a'
|
||||
'3956c1226e64f0ce4df463f80b55b15eed06ecd9b8703b3e8309d4236a6e1ca84e43007336f3987bc862d8a5e7cfcaaf6653125d2a34999a0f1357c52e7c4990')
|
||||
b2sums=('dab7e871c798a6e0f03f45eaa49ba5cbabc18afabd6a5675a3241e4f1e6d86ef21b56b4cee5d561da2f2ec2b274ac6c5a52ed7b8ad50cbf02949a3a7f68d4f09'
|
||||
'3cebcc993f51eaf0e09673c77e0436598593ef5eff306d880415ccc8eecb32fee93c9a6986f1a7bb0835ab7f9732369d7c5a07e6c053d6293e73a1ea84c58a5c')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
sed 's| Rev Unknown from unknown||' -i tools/make-version.pl
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgbase}-${pkgver}
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_INSTALL_RPATH= \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-Wno-dev
|
||||
ninja -C build -v
|
||||
}
|
||||
|
||||
package_wireshark-cli() {
|
||||
pkgdesc+=' - CLI tools and data files'
|
||||
depends=('glibc' 'c-ares' 'libmaxminddb' 'krb5' 'libgcrypt' 'libcap' 'libpcap'
|
||||
'gnutls' 'glib2' 'lua52' 'libssh' 'libxml2' 'libnghttp2' 'snappy'
|
||||
'lz4' 'spandsp' 'sbc' 'bcg729' 'zstd' 'zlib' 'brotli' 'speexdsp'
|
||||
'opus')
|
||||
install=wireshark.install
|
||||
conflicts=(wireshark)
|
||||
provides=(libwireshark.so libwiretap.so libwsutil.so)
|
||||
|
||||
cd ${pkgbase}-${pkgver}
|
||||
DESTDIR="${pkgdir}" ninja -C build 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/share/doc/wireshark/wireshark.html \
|
||||
usr/bin/wireshark \
|
||||
usr/share/applications/wireshark.desktop \
|
||||
usr/share/appdata/wireshark.appdata.xml
|
||||
}
|
||||
|
||||
package_wireshark-qt() {
|
||||
pkgdesc+=' - Qt GUI'
|
||||
depends=('glibc' 'desktop-file-utils' 'qt5-multimedia' 'qt5-svg'
|
||||
'wireshark-cli' 'libwireshark.so' 'libwiretap.so' 'libwsutil.so'
|
||||
'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'gcc-libs'
|
||||
'zlib' 'libpcap' 'libgcrypt' 'libnl' 'minizip')
|
||||
replaces=(wireshark wireshark-gtk wireshark-common)
|
||||
conflicts=(wireshark wireshark-gtk wireshark-common)
|
||||
|
||||
cd ${pkgbase}-${pkgver}
|
||||
install -d "${srcdir}/staging"
|
||||
DESTDIR="${srcdir}/staging" ninja -C build install
|
||||
|
||||
install -Dm 755 build/run/wireshark -t "${pkgdir}/usr/bin"
|
||||
install -Dm 644 build/doc/wireshark.1 -t "${pkgdir}/usr/share/man/man1"
|
||||
install -Dm 644 build/doc/wireshark.html -t "${pkgdir}/usr/share/doc/wireshark"
|
||||
install -Dm 644 wireshark.desktop -t "${pkgdir}/usr/share/applications"
|
||||
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:
|
8
wireshark/wireshark.install
Normal file
8
wireshark/wireshark.install
Normal file
@ -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
|
||||
}
|
1
wireshark/wireshark.sysusers
Normal file
1
wireshark/wireshark.sysusers
Normal file
@ -0,0 +1 @@
|
||||
g wireshark 150 - -
|
Loading…
x
Reference in New Issue
Block a user