void-packages/srcpkgs/wireshark/template
2022-04-03 10:21:12 +02:00

101 lines
2.7 KiB
Bash

# Template file for 'wireshark'
pkgname=wireshark
version=3.6.3
revision=1
build_style=cmake
hostmakedepends="pkg-config flex gettext perl python3-devel mit-krb5-devel
qt5-tools qt5-host-tools qt5-qmake ruby-asciidoctor"
makedepends="libpcap-devel zlib-devel lua52-devel mit-krb5-devel gnutls-devel
libmaxminddb-devel libgcrypt-devel libcap-devel sbc-devel c-ares-devel libxml2-devel
libssh-devel libnl3-devel spandsp-devel tiff-devel libcap-progs liblz4-devel
nghttp2-devel qt5-devel qt5-tools-devel qt5-multimedia-devel qt5-svg-devel
minizip-devel libzstd-devel brotli-devel speexdsp-devel"
depends="libcap-progs"
short_desc="Network protocol analyzer"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.wireshark.org"
distfiles="https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz"
checksum=b60364a4c0068a10811ab3fd075ca6c1eb0e75d44600271b88a20ed93a2ef631
system_groups="wireshark"
CFLAGS="-DNDEBUG -I${XBPS_CROSS_BASE}/usr/include/lua5.2"
CXXFLAGS="-DNDEBUG -I${XBPS_CROSS_BASE}/usr/include/lua5.2"
post_patch() {
# systemd-journal integration
vsed -i '/test_sdjournal/,/check_extcap.*sdjournal/d' \
test/suite_extcaps.py
}
pre_check() {
ninja -C build test-programs
}
if [ "${XBPS_ALLOW_CHROOT_BREAKOUT}" = "yes" ]; then
do_check() {
# Many tests fail when run as root (i.e. in CI)
test/test.py --disable-capture -p build/run \
suite_decryption \
suite_dissectors.group_asterix \
suite_extcaps \
suite_fileformats \
suite_follow \
suite_follow_dccp \
suite_follow_multistream \
suite_io \
suite_mergecap \
suite_netperfmeter \
suite_release \
suite_text2pcap \
suite_unittests
}
fi
post_install() {
rm -f -- "${DESTDIR}/usr/bin/lemon"
rm -f -- "${DESTDIR}/usr/lib/wireshark/cmake/UseLemon.cmake"
local _includeDir=usr/include/wireshark
# Headers
vmkdir $_includeDir
vcopy ws_symbol_export.h $_includeDir
for i in wiretap wsutil; do
vmkdir $_includeDir/$i
vcopy "$i/*.h" $_includeDir/$i
done
chmod 0750 $DESTDIR/usr/bin/dumpcap
}
libwireshark_package() {
short_desc+=" - library"
pkg_install() {
vmove "usr/lib/*.so.*"
vmove usr/lib/wireshark/extcap
vmove usr/lib/wireshark/plugins
}
}
libwireshark-devel_package() {
short_desc+=" - development files"
depends="libwireshark>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/lib/wireshark/cmake
}
}
wireshark-qt_package() {
depends="${sourcepkg}>=${version}_${revision} desktop-file-utils"
short_desc+=" - Qt frontend"
pkg_install() {
vmove usr/bin/wireshark
vmove usr/share/man/man1/wireshark.1
vmove usr/share/applications/org.wireshark.Wireshark.desktop
}
}