Index: PKGBUILD =================================================================== --- PKGBUILD (revision 89988) +++ PKGBUILD (working copy) @@ -1,33 +1,54 @@ # $Id$ # Maintainer: Guillaume ALAUX -pkgname=wireshark +pkgname=(wireshark-cli wireshark-gtk) +pkgbase=wireshark pkgver=1.4.0 -pkgrel=2 -pkgdesc="A free network protocol analyzer for Unix/Linux and Windows" +pkgrel=3 arch=('i686' 'x86_64') license=('GPL2') -depends=('gtk2' 'heimdal' 'libpcap' 'bash' 'gnutls' 'libcap') -makedepends=('bison' 'flex') +makedepends=('bison' 'flex' "gtk2" 'heimdal' 'libpcap' 'bash' 'gnutls' 'libcap') url="http://www.wireshark.org/" -install=wireshark.install options=(!libtool) -source=(http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.bz2 wireshark.desktop wireshark.png) +source=(http://www.wireshark.org/download/src/${pkgbase}-${pkgver}.tar.bz2 wireshark.desktop wireshark.png) md5sums=('13b188baea23cdad40b7a55921384a77' '504ede44c02b2a52f6cbd3bffdf93b8d' 'e771800a8c977fe223583a453bc27397') build() { - cd ${srcdir}/${pkgname}-${pkgver} + cd "${srcdir}/${pkgbase}-${pkgver}" export CFLAGS="-fno-unit-at-a-time ${CFLAGS}" ./configure --prefix=/usr --with-ssl make all - make DESTDIR=${pkgdir} install +} - install -Dm644 ${srcdir}/wireshark.png ${pkgdir}/usr/share/icons/wireshark.png - install -Dm644 ${srcdir}/wireshark.desktop ${pkgdir}/usr/share/applications/wireshark.desktop +package_wireshark-cli() { + pkgdesc="A free network protocol analyzer for Unix/Linux and Windows - CLI version" + depends=('heimdal' 'libpcap' 'bash' 'gnutls' 'libcap' 'glib2') + install=wireshark.install + conflicts=(wireshark) + +cd "${srcdir}/${pkgbase}-${pkgver}" + + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/wireshark.png" "${pkgdir}/usr/share/icons/wireshark.png" + install -Dm644 "${srcdir}/wireshark.desktop" "${pkgdir}/usr/share/applications/wireshark.desktop" #wireshark uid group is 150 chgrp 150 "${pkgdir}/usr/bin/dumpcap" chmod 754 "${pkgdir}/usr/bin/dumpcap" + rm "$pkgdir/usr/bin/wireshark" } + +package_wireshark-gtk() { + pkgdesc="A free network protocol analyzer for Unix/Linux and Windows - GTK version" + depends=("gtk2" "wireshark-cli") + replaces=(wireshark) + conflicts=(wireshark) + + cd "${srcdir}/${pkgbase}-${pkgver}" + + install -Dm755 .libs/wireshark "$pkgdir/usr/bin/wireshark" + +}