diff --git a/srcpkgs/wireshark-gtk b/srcpkgs/wireshark-gtk new file mode 120000 index 0000000000..bb29b6f1b4 --- /dev/null +++ b/srcpkgs/wireshark-gtk @@ -0,0 +1 @@ +wireshark \ No newline at end of file diff --git a/srcpkgs/wireshark-qt b/srcpkgs/wireshark-qt new file mode 120000 index 0000000000..bb29b6f1b4 --- /dev/null +++ b/srcpkgs/wireshark-qt @@ -0,0 +1 @@ +wireshark \ No newline at end of file diff --git a/srcpkgs/wireshark/template b/srcpkgs/wireshark/template index bc0f127f43..a2fc508eca 100644 --- a/srcpkgs/wireshark/template +++ b/srcpkgs/wireshark/template @@ -1,26 +1,35 @@ # Template file for 'wireshark' pkgname=wireshark version=1.12.2 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-ssl --with-pcap --with-libcap --with-zlib --with-lua - --with-krb5 --without-portaudio CC_FOR_BUILD=cc" -hostmakedepends="pkg-config flex perl mit-krb5-devel libtool" -makedepends="libpcap-devel zlib-devel lua-devel mit-krb5-devel gtk+3-devel qt-devel" -depends="libcap-progs" -short_desc="A graphical network protocol analyzer for Unix/Linux" + --with-krb5 --with-gtk3=yes --without-portaudio CC_FOR_BUILD=cc" +hostmakedepends="pkg-config flex perl python-devel mit-krb5-devel libtool" +makedepends="libpcap-devel zlib-devel lua-devel mit-krb5-devel gnutls-devel + geoip-devel libgcrypt-devel gtk+3-devel" +depends="libwireshark>=${version}_${revision} libcap-progs" +replaces="wireshark<1.12.2_1" +short_desc="A network protocol analyzer" maintainer="Enno Boland " homepage="http://www.wireshark.org" license="GPL-2" distfiles="http://www.wireshark.org/download/src/${pkgname}-${version}.tar.bz2" checksum=30ae16b408a592642ce3a84dd9877d24df7a6dae8da4847486965190039df292 system_groups="wireshark" +subpackages="libwireshark libwireshark-devel wireshark-gtk" + +if [ -z "$CROSS_BUILD" ]; then + makedepends+=" qt-devel" + configure_args+=" --with-qt=yes" + subpackages+=" wireshark-qt" +else + configure_args+=" --with-qt=no" +fi pre_configure() { libtoolize -f - sed -i \ - -e "s/^LIBS = .*/\0 -ldl/" \ - `find -name Makefile.in` + find -type f -name Makefile.in -exec sed -i "s/^LIBS = .*/\0 -ldl/" {} \; } post_install() { local _includeDir=usr/include/wireshark @@ -34,9 +43,13 @@ post_install() { vinstall image/WiresharkDoc-${d}.png 644 \ usr/share/icons/hicolor/${d}x${d}/mimetypes/application-vnd.tcpdump.pcap.png done - + # Desktop Launcher - vinstall wireshark.desktop 644 usr/share/applications/wireshark.desktop + vinstall wireshark.desktop 644 usr/share/applications + if [ -z "$CROSS_BUILD" ]; then + sed -i 's/^Name.*=Wireshark/& (Qt)/g;/Exec=/s/wireshark/&-qt/g' wireshark.desktop + vinstall wireshark.desktop 644 usr/share/applications wireshark-qt.desktop + fi # Headers vmkdir $_includeDir @@ -65,3 +78,25 @@ libwireshark-devel_package() { vmove usr/lib/*.so } } + +wireshark-gtk_package() { + replaces="wireshark<1.12.2_1" + depends="${sourcepkg}>=${version}_${revision} hicolor-icon-theme desktop-file-utils" + short_desc+=" - GTK+ frontend" + pkg_install() { + vmove usr/bin/wireshark + vmove usr/share/icons + vmove usr/share/man/man1/wireshark.1 + vmove usr/share/applications/wireshark.desktop + } +} + +wireshark-qt_package() { + replaces="wireshark<1.12.2_1" + depends="${sourcepkg}>=${version}_${revision} desktop-file-utils" + short_desc+=" - Qt frontend" + pkg_install() { + vmove usr/bin/wireshark-qt + vmove usr/share/applications/wireshark-qt.desktop + } +}