2019-05-19 22:26:47 +02:00
|
|
|
# Description: Network Sniffer
|
2021-01-29 12:48:31 +00:00
|
|
|
# URL: https://www.wireshark.org
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
|
|
# Depends on: c-ares hicolor-icon-theme libgcrypt libpcap qt5
|
2006-09-25 18:20:26 +00:00
|
|
|
|
|
|
|
name=wireshark
|
2022-05-06 15:58:10 +02:00
|
|
|
version=3.6.5
|
2014-11-23 22:59:19 +01:00
|
|
|
release=1
|
2020-05-24 22:53:43 +10:00
|
|
|
source=(https://www.wireshark.org/download/src/$name-$version.tar.xz)
|
2006-09-25 18:20:26 +00:00
|
|
|
|
|
|
|
build() {
|
2022-03-25 09:55:25 +01:00
|
|
|
prt-get isinst ccache && PKGMK_WIRESHARK+=' -D ENABLE_CCACHE=ON'
|
|
|
|
|
2022-05-06 15:58:10 +02:00
|
|
|
# lto only works well with lld due to a ld bug
|
|
|
|
prt-get isinst clang lld && \
|
|
|
|
export CC='clang' && \
|
|
|
|
export CXX='clang++' && \
|
|
|
|
export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib && \
|
|
|
|
export LDFLAGS+=' -fuse-ld=lld -flto=thin'
|
|
|
|
prt-get isinst clang lld && PKGMK_WIRESHARK+=' -D ENABLE_LTO=ON '
|
|
|
|
|
2022-03-25 09:55:25 +01:00
|
|
|
cmake -S $name-$version -B build -G Ninja $PKGMK_WIRESHARK \
|
2020-12-15 15:23:03 +01:00
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
2022-05-06 15:58:10 +02:00
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib
|
2006-09-25 18:20:26 +00:00
|
|
|
|
2020-05-24 22:53:43 +10:00
|
|
|
cmake --build build
|
2020-07-08 23:14:57 +10:00
|
|
|
DESTDIR=$PKG cmake --install build
|
2006-09-25 18:20:26 +00:00
|
|
|
|
2022-05-06 15:58:10 +02:00
|
|
|
chown root:wireshark $PKG/usr/bin/dumpcap
|
|
|
|
chmod u+s $PKG/usr/bin/dumpcap
|
|
|
|
|
2014-11-13 22:00:51 +01:00
|
|
|
# Don't remove these files, they are read by wireshark's about box.
|
|
|
|
#rm -f $PKG/usr/share/$name/{AUTHORS-SHORT,COPYING}
|
2006-09-25 18:20:26 +00:00
|
|
|
}
|