aboutsummaryrefslogtreecommitdiffstats
path: root/main/wireshark/APKBUILD
blob: 070c83a6f39d85d56cb2c0a85c165214ec65ca10 (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wireshark
pkgver=1.12.4
pkgrel=0
pkgdesc="A network protocol analyzer - GTK version"
url="http://www.wireshark.org"
arch="all"
license="GPL2+"
depends=""
makedepends="bison flex perl glib glib-dev pkgconfig libpcap-dev libcap-dev
	gtk+3.0-dev c-ares-dev pcre-dev gnutls-dev libgcrypt-dev openssl-dev
	libnl3-dev qt5-qtbase-dev bash"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-common tshark"
source="http://www.wireshark.org/download/src/$pkgname-$pkgver.tar.bz2"

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

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ssl \
		--with-gnutls \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install install_desktop_files || return 1
	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|*-qt) 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
}

qt() {
	pkgdesc="wireshark - Qt GUI"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/wireshark-qt "$subpkgdir"/usr/bin/
}
md5sums="acfa156fd35cb66c867b1ace992e4b5b  wireshark-1.12.4.tar.bz2"
sha256sums="de804e98e252e4b795d28d6ac2d48d7f5aacd9b046ee44d44266983795ebc312  wireshark-1.12.4.tar.bz2"
sha512sums="ceeb6cb4489ce150a6065e586f83cfbcd0fd79cd05cf8ab5b0346baa03eaa5188503b18a1f228458447235d79f765c410e6b52b9aae77547f80b206429c77b24  wireshark-1.12.4.tar.bz2"