opt/wireshark/Pkgfile

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-05-19 22:26:47 +02:00
# Description: Network Sniffer
2021-01-29 13:48:31 +01:00
# URL: https://www.wireshark.org
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: c-ares hicolor-icon-theme libgcrypt libpcap qt5
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 14:53:43 +02:00
source=(https://www.wireshark.org/download/src/$name-$version.tar.xz)
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 \
-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
2020-05-24 14:53:43 +02:00
cmake --build build
2020-07-08 15:14:57 +02:00
DESTDIR=$PKG cmake --install build
2022-05-06 15:58:10 +02:00
chown root:wireshark $PKG/usr/bin/dumpcap
chmod u+s $PKG/usr/bin/dumpcap
# Don't remove these files, they are read by wireshark's about box.
#rm -f $PKG/usr/share/$name/{AUTHORS-SHORT,COPYING}
}