aboutsummaryrefslogblamecommitdiffstats
path: root/main/wireshark/APKBUILD
blob: 8249251c5df1ad1806a1d1d46f45b0efe7c773ff (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                            
                                                   
                 
            
        
                                                 
                              
          
               


                                                                           
          



                                                                          
 

                                     






                                                     

            







                                           
                            



                                     

            
 

                                     




                                                                  

 






















                                                                
                                                                  

                                                   
# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wireshark
pkgver=1.4.2
pkgrel=0
pkgdesc="network protocol analyzer - GTK version"
url="http://www.wireshark.org"
arch="all"
license="GPLv2"
depends="bash"
makedepends="bison flex perl glib glib-dev pkgconfig libpcap-dev libcap-dev
	gtk+-dev c-ares-dev pcre-dev openssl-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-common tshark"
source="http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.bz2
	wireshark.desktop
	wireshark.png"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in "$source"; do
		case "$i" in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$i" || return 1
			;;
		esac
	done
}

build() {
	cd "$srcdir"/$pkgname-$pkgver

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ssl \
		--disable-text2pcap \
		--disable-idl2wrs \
		--disable-dftest \
		--disable-randpkt
	make
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make -j1 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
}

common() {
	local i
	pkgdesc="network protoccol analyzer - common files"
	mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/bin
	mv "$pkgdir"/etc "$subpkgdir"/
	mv "$pkgdir"/usr/share/wireshark "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/lib/* "$subpkgdir"/usr/lib/
	# move all bins except wireshark
	for i in "$pkgdir"/usr/bin/*; do
		case "$i" in
			*/tshark|*/wireshark) continue;;
		esac
		mv "$i" "$subpkgdir"/usr/bin/
	done
}

tshark() {
	pkgdesc="network protoccol analyzer - console version"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/tshark "$subpkgdir"/usr/bin/tshark
}

md5sums="5429561935ea0d1ee572793b55446918  wireshark-1.4.2.tar.bz2
504ede44c02b2a52f6cbd3bffdf93b8d  wireshark.desktop
e771800a8c977fe223583a453bc27397  wireshark.png"