mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
175 lines
5.8 KiB
Bash
175 lines
5.8 KiB
Bash
SUMMARY="A network protocol analyzer formerly known as ethereal"
|
|
SUMMARY_gui="A GUI for the network protocol analyzer Wireshark"
|
|
DESCRIPTION="Wireshark is a network traffic analyzer, or \"sniffer\", for Unix \
|
|
and Unix-like operating systems. It uses Qt, a graphical user interface \
|
|
library, and libpcap, a packet capture and filtering library.
|
|
|
|
The graphical user interface (GUI) is available as a separate package.
|
|
|
|
The Wireshark distribution also comes with TShark, which is a \
|
|
line-oriented sniffer (similar to Sun's snoop, or tcpdump) that uses the \
|
|
same dissection, capture-file reading and writing, and packet filtering \
|
|
code as Wireshark, and with editcap, which is a program to read capture \
|
|
files and write the packets from that capture file, possibly in a \
|
|
different capture file format, and with some packets possibly removed \
|
|
from the capture."
|
|
DESCRIPTION_gui="This is the graphical user interface for Wireshark, which is available as a \
|
|
separate package.
|
|
|
|
Wireshark is a network traffic analyzer, or \"sniffer\", for Unix \
|
|
and Unix-like operating systems. It uses Qt, a graphical user interface \
|
|
library, and libpcap, a packet capture and filtering library."
|
|
HOMEPAGE="https://www.wireshark.org"
|
|
COPYRIGHT="1998-2024 Gerald Combs"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://www.wireshark.org/download/src/all-versions/wireshark-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="9e3672be8c6caf9279a5a13582d6711ab699ae2a79323e92a99409c1ead98521"
|
|
ADDITIONAL_FILES="wireshark.rdef.in"
|
|
PATCHES="wireshark-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libwiresharkLibVersion="17.0.0"
|
|
libwiresharkLibVersionCompat="$libwiresharkLibVersion compat >= ${libwiresharkLibVersion%%.*}"
|
|
|
|
libwiretapLibVersion="14.0.0"
|
|
libwiretapLibVersionCompat="$libwiretapLibVersion compat >= ${libwiretapLibVersion%%.*}"
|
|
|
|
libwsutilLibVersion="15.0.0"
|
|
libwsutilLibVersionCompat="$libwsutilLibVersion compat >= ${libwsutilLibVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
wireshark$secondaryArchSuffix = $portVersion
|
|
cmd:capinfos
|
|
cmd:captype
|
|
cmd:dumpcap
|
|
cmd:editcap
|
|
cmd:idl2wrs
|
|
cmd:mergecap
|
|
cmd:randpkt
|
|
cmd:rawshark
|
|
cmd:reordercap
|
|
cmd:sharkd
|
|
cmd:text2pcap
|
|
cmd:tshark
|
|
devel:libwireshark$secondaryArchSuffix = $libwiresharkLibVersionCompat
|
|
devel:libwiretap$secondaryArchSuffix = $libwiretapLibVersionCompat
|
|
devel:libwsutil$secondaryArchSuffix = $libwsutilLibVersionCompat
|
|
lib:libwireshark$secondaryArchSuffix = $libwiresharkLibVersionCompat
|
|
lib:libwiretap$secondaryArchSuffix = $libwiretapLibVersionCompat
|
|
lib:libwsutil$secondaryArchSuffix = $libwsutilLibVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcares$secondaryArchSuffix
|
|
lib:libgcrypt$secondaryArchSuffix
|
|
lib:libglib_2.0$secondaryArchSuffix
|
|
lib:libgmodule_2.0$secondaryArchSuffix
|
|
lib:libgpg_error$secondaryArchSuffix
|
|
lib:libgthread_2.0$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libpcap$secondaryArchSuffix
|
|
lib:libpcre2_8$secondaryArchSuffix
|
|
lib:libspeexdsp$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_gui="
|
|
wireshark${secondaryArchSuffix}_gui = $portVersion
|
|
cmd:wireshark
|
|
app:Wireshark
|
|
"
|
|
REQUIRES_gui="
|
|
haiku$secondaryArchSuffix
|
|
wireshark${secondaryArchSuffix} == $portVersion base
|
|
lib:libgcrypt$secondaryArchSuffix
|
|
lib:libgmodule_2.0$secondaryArchSuffix
|
|
lib:libpcap$secondaryArchSuffix
|
|
lib:libpcre2_8$secondaryArchSuffix
|
|
lib:libQt6Core$secondaryArchSuffix
|
|
lib:libQt6Core5Compat$secondaryArchSuffix
|
|
lib:libQt6Gui$secondaryArchSuffix
|
|
lib:libQt6Multimedia$secondaryArchSuffix
|
|
lib:libQt6PrintSupport$secondaryArchSuffix
|
|
lib:libQt6Widgets$secondaryArchSuffix
|
|
lib:libspeexdsp$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcares$secondaryArchSuffix
|
|
devel:libgcrypt$secondaryArchSuffix
|
|
devel:libgl$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
devel:libgpg_error$secondaryArchSuffix
|
|
devel:libpcap$secondaryArchSuffix
|
|
devel:libQt6Core$secondaryArchSuffix
|
|
devel:libQt6Core5Compat$secondaryArchSuffix
|
|
devel:libQt6Gui$secondaryArchSuffix
|
|
devel:libQt6Multimedia$secondaryArchSuffix
|
|
devel:libQt6PrintSupport$secondaryArchSuffix
|
|
devel:libQt6Widgets$secondaryArchSuffix
|
|
devel:libspeexdsp$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:bison
|
|
cmd:cmake
|
|
cmd:flex
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:libtoolize
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
cmd:strip$secondaryArchSuffix
|
|
qt6_tools${secondaryArchSuffix}_devel
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -S . -B build -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=$prefix \
|
|
-DCMAKE_INSTALL_DATAROOTDIR=data \
|
|
-DCMAKE_INSTALL_DOCDIR=documentation/packages/wireshark \
|
|
-DCMAKE_INSTALL_INCLUDEDIR=develop/headers$secondaryArchSubDir \
|
|
-DCMAKE_INSTALL_INFODIR=documentation/info \
|
|
-DCMAKE_INSTALL_LIBEXECDIR=lib$secondaryArchSubDir \
|
|
-DCMAKE_INSTALL_LIBDIR=lib$secondaryArchSubDir \
|
|
-DCMAKE_INSTALL_MANDIR=documentation/man \
|
|
-DCMAKE_INSTALL_OLDINCLUDEDIR=develop/headers$secondaryArchSubDir \
|
|
-DCMAKE_INSTALL_SBINDIR=bin \
|
|
-DCMAKE_INSTALL_SYSCONFDIR=$sysconfDir \
|
|
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork" \
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cmake --install build
|
|
|
|
prepareInstalledDevelLibs libwireshark libwiretap libwsutil
|
|
fixPkgconfig
|
|
|
|
mkdir -p $appsDir
|
|
ln -s $prefix/bin/wireshark $appsDir/Wireshark
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/wireshark.rdef.in > $sourceDir/wireshark.rdef
|
|
addResourcesToBinaries $sourceDir/wireshark.rdef $appsDir/Wireshark
|
|
|
|
addAppDeskbarSymlink $appsDir/Wireshark
|
|
|
|
packageEntries gui $appsDir $dataDir/deskbar $prefix/bin/wireshark
|
|
}
|