wireshark: split gtk/qt interfaces into their own sub-packages

This also indireclty fixes cross build (+gtk, -qt).
This commit is contained in:
Alessio Sergi 2014-11-14 20:14:11 +01:00
parent 4d11c075c7
commit 43716e7861
3 changed files with 48 additions and 11 deletions

1
srcpkgs/wireshark-gtk Symbolic link
View file

@ -0,0 +1 @@
wireshark

1
srcpkgs/wireshark-qt Symbolic link
View file

@ -0,0 +1 @@
wireshark

View file

@ -1,26 +1,35 @@
# Template file for 'wireshark' # Template file for 'wireshark'
pkgname=wireshark pkgname=wireshark
version=1.12.2 version=1.12.2
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
configure_args="--with-ssl --with-pcap --with-libcap --with-zlib --with-lua configure_args="--with-ssl --with-pcap --with-libcap --with-zlib --with-lua
--with-krb5 --without-portaudio CC_FOR_BUILD=cc" --with-krb5 --with-gtk3=yes --without-portaudio CC_FOR_BUILD=cc"
hostmakedepends="pkg-config flex perl mit-krb5-devel libtool" hostmakedepends="pkg-config flex perl python-devel mit-krb5-devel libtool"
makedepends="libpcap-devel zlib-devel lua-devel mit-krb5-devel gtk+3-devel qt-devel" makedepends="libpcap-devel zlib-devel lua-devel mit-krb5-devel gnutls-devel
depends="libcap-progs" geoip-devel libgcrypt-devel gtk+3-devel"
short_desc="A graphical network protocol analyzer for Unix/Linux" depends="libwireshark>=${version}_${revision} libcap-progs"
replaces="wireshark<1.12.2_1"
short_desc="A network protocol analyzer"
maintainer="Enno Boland <eb@s01.de>" maintainer="Enno Boland <eb@s01.de>"
homepage="http://www.wireshark.org" homepage="http://www.wireshark.org"
license="GPL-2" license="GPL-2"
distfiles="http://www.wireshark.org/download/src/${pkgname}-${version}.tar.bz2" distfiles="http://www.wireshark.org/download/src/${pkgname}-${version}.tar.bz2"
checksum=30ae16b408a592642ce3a84dd9877d24df7a6dae8da4847486965190039df292 checksum=30ae16b408a592642ce3a84dd9877d24df7a6dae8da4847486965190039df292
system_groups="wireshark" 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() { pre_configure() {
libtoolize -f libtoolize -f
sed -i \ find -type f -name Makefile.in -exec sed -i "s/^LIBS = .*/\0 -ldl/" {} \;
-e "s/^LIBS = .*/\0 -ldl/" \
`find -name Makefile.in`
} }
post_install() { post_install() {
local _includeDir=usr/include/wireshark local _includeDir=usr/include/wireshark
@ -36,7 +45,11 @@ post_install() {
done done
# Desktop Launcher # 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 # Headers
vmkdir $_includeDir vmkdir $_includeDir
@ -65,3 +78,25 @@ libwireshark-devel_package() {
vmove usr/lib/*.so 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
}
}