aboutsummaryrefslogtreecommitdiffstats
path: root/main/wireshark/APKBUILD
blob: 23b2fe16747eb71ef519a2214fe82f672f41bdac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wireshark
pkgver=1.10.1
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 gnutls-dev libgcrypt-dev openssl-dev
	libnl3-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-common tshark"
source="http://www.wireshark.org/download/src/${pkgname}-${pkgver}.tar.bz2
	pod-encoding.patch
	wireshark.desktop
	wireshark.png"

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

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

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ssl \
		--with-gnutls \
		--disable-text2pcap \
		--disable-dftest \
		--disable-randpkt \
		|| return 1
	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
	find "$pkgdir" -name '*.la' -delete
}

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="d8915cf7555e2bbb699020a8736631e7  wireshark-1.10.1.tar.bz2
2d08a9d18cf9215b4c4753cf9a4746b9  pod-encoding.patch
504ede44c02b2a52f6cbd3bffdf93b8d  wireshark.desktop
e771800a8c977fe223583a453bc27397  wireshark.png"
sha256sums="06499544f053cc1f73529278ede0ac210d709cada8267e81d908bd346cc0c5bc  wireshark-1.10.1.tar.bz2
3202cd18c4c47cfe28c0c442e3bf44c5044e23ddc5c28c2e58ae89e4553ff6b2  pod-encoding.patch
10c8b5bdd1d161454c93df166f39b2bae72efe6021beb61d84dd65dc329260fe  wireshark.desktop
a9f6d78dd64a87acd1b600222156b9fc26e7ccbbc43fc77c1da138908bdb2d3c  wireshark.png"
sha512sums="ae80b4959bd224ce0458055fdb7e8bd5e2395da09b658e1b2a3136540cb2b7d283b10f636cd2f534dd20dc2fc65892e2be4acb65ffa6e259a0539a1f8ee74cbd  wireshark-1.10.1.tar.bz2
83f12901d366329d7338dc528d4573d3874397554d4d38373384b892c51c42e5609d7c039c1faba87210751efda897831ccc8f68e2cf51eb4a207b6e7e97b486  pod-encoding.patch
6e1eab7793a97377017be9126b7d25bd9c10d2b0e06be1e83e66ac2ea64dce5c4f8f7783d483921867241d298eb0ac82ff3f9910e90c2065125bff9a3856f52e  wireshark.desktop
b421575dbc3d496a8c3d5485929c161c06d3403bff2fef4f1db07b1db729ca173c6e89cb648d127c02800359975d5e0880c344dc58fa9d24dde570a862bdd7d4  wireshark.png"