# Template file for 'wireshark' pkgname=wireshark version=4.6.3 revision=1 build_style=cmake configure_args="-DHAVE_C99_VSNPRINTF=ON" hostmakedepends="pkg-config flex gettext perl python3-devel mit-krb5-devel qt6-base qt6-tools ruby-asciidoctor libxslt sqlite-lemon" makedepends="libpcap-devel zlib-devel lua54-devel mit-krb5-devel gnutls-devel libmaxminddb-devel libgcrypt-devel libcap-devel sbc-devel c-ares-devel libssh-devel libnl3-devel spandsp-devel tiff-devel libcap-progs liblz4-devel libxml2-devel nghttp2-devel nghttp3-devel snappy-devel opus-devel bcg729-devel libilbc-devel opencore-amr-devel xxHash-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-qt5compat-devel libglib-devel minizip-devel libzstd-devel brotli-devel speexdsp-devel pcre2-devel" depends="libcap-progs" checkdepends="python3-pytest-xdist" short_desc="Network protocol analyzer" maintainer="Đoàn Trần Công Danh " license="GPL-2.0-or-later" homepage="https://www.wireshark.org" changelog="https://www.wireshark.org/news/" distfiles="https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz" checksum=9fa6a745df8540899dc9d433e4634d6755371ff87bd722ce04c7d7b0132d9af3 system_groups="wireshark" CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.4" # Match with whatever defined in wireshark CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3" CXXFLAGS="$CFLAGS" if [ -z "$CROSS_BUILD" ]; then case "$XBPS_TARGET_MACHINE" in i686*) ;; *) makedepends+=" sysdig" ;; esac fi post_patch() { # systemd-journal integration vsed -i '/test_sdjournal/,/check_extcap.*sdjournal/d' \ test/suite_extcaps.py } pre_check() { ninja -C build test-programs } post_install() { local _includeDir=usr/include/wireshark for i in wiretap wsutil; do vmkdir $_includeDir/$i vcopy "$i/*.h" $_includeDir/$i done chmod 0750 $DESTDIR/usr/bin/dumpcap vdoc "${FILESDIR}/README.voidlinux" } libwireshark_package() { short_desc+=" - library" pkg_install() { vmove "usr/lib/*.so.*" vmove usr/libexec 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/cmake/wireshark } } wireshark-qt_package() { depends="${sourcepkg}>=${version}_${revision} desktop-file-utils qt6-svg" 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 } }