aboutsummaryrefslogtreecommitdiffstats
path: root/community/wireshark/APKBUILD
blob: e66e6224fd08b69fa86caf9056fea3f0d7d00323 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wireshark
pkgver=2.4.6
pkgrel=0
pkgdesc="A network protocol analyzer - GTK version"
url="http://www.wireshark.org"
arch="all"
license="GPL-2.0-or-later"
depends=""
makedepends="bison flex perl-dev glib glib-dev libpcap-dev libcap-dev
	gtk+3.0-dev c-ares-dev pcre-dev gnutls-dev libgcrypt-dev libressl-dev
	libnl3-dev qt5-qtbase-dev qt5-qttools-dev lua5.2-dev bash portaudio-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-gtk $pkgname-common tshark"
source="http://www.wireshark.org/download/src/$pkgname-$pkgver.tar.xz
	fix-udpdump.patch
        "
builddir="$srcdir"/$pkgname-$pkgver

# secfixes:
#   2.4.5-r0:
#     - CVE-2018-7320
#     - CVE-2018-7321
#     - CVE-2018-7322
#     - CVE-2018-7323
#     - CVE-2018-7324
#     - CVE-2018-7325
#     - CVE-2018-7326
#     - CVE-2018-7327
#     - CVE-2018-7328
#     - CVE-2018-7329
#     - CVE-2018-7330
#     - CVE-2018-7331
#     - CVE-2018-7332
#     - CVE-2018-7333
#     - CVE-2018-7334
#     - CVE-2018-7335
#     - CVE-2018-7336
#     - CVE-2018-7337
#     - CVE-2018-7417
#     - CVE-2018-7418
#     - CVE-2018-7419
#     - CVE-2018-7420
#   2.4.4-r0:
#     - CVE-2018-5334
#     - CVE-2018-5335
#     - CVE-2018-5336
#   2.4.3-r0:
#     - CVE-2017-17083
#     - CVE-2017-17084
#     - CVE-2017-17085
#   2.4.2-r0:
#     - CVE-2017-15191
#     - CVE-2017-15192
#     - CVE-2017-15193
#   2.4.1-r0:
#     - CVE-2017-13765
#     - CVE-2017-13766
#     - CVE-2017-13767
#   2.2.10-r0:
#     - CVE-2017-15191
#     - CVE-2017-15192
#     - CVE-2017-15193
#   2.2.9-r0:
#     - CVE-2017-13765
#     - CVE-2017-13766
#     - CVE-2017-13767
#   2.2.8-r0:
#     - CVE-2017-11406
#     - CVE-2017-11407
#     - CVE-2017-11408
#   2.2.7-r0:
#     - CVE-2017-9343
#     - CVE-2017-9344
#     - CVE-2017-9345
#     - CVE-2017-9346
#     - CVE-2017-9347
#     - CVE-2017-9348
#     - CVE-2017-9349
#     - CVE-2017-9350
#     - CVE-2017-9351
#     - CVE-2017-9352
#     - CVE-2017-9353
#     - CVE-2017-9354
#   2.2.6-r0:
#     - CVE-2017-7700
#     - CVE-2017-7701
#     - CVE-2017-7702
#     - CVE-2017-7703
#     - CVE-2017-7704
#     - CVE-2017-7705
#   2.2.5-r0:
#     - CVE-2017-6467
#     - CVE-2017-6468
#     - CVE-2017-6469
#     - CVE-2017-6470
#     - CVE-2017-6471
#     - CVE-2017-6472
#     - CVE-2017-6473
#     - CVE-2017-6474
#   2.2.4-r1:
#     - CVE-2017-6014
#   2.0.5-r0:
#     - CVE-2016-6505
#     - CVE-2016-6506
#     - CVE-2016-6508
#     - CVE-2016-6509
#     - CVE-2016-6510
#     - CVE-2016-6511
#     - CVE-2016-6512
#     - CVE-2016-6513

build() {
	cd "$builddir"
	# configure script searches for uic and uic-qt4 but not uic-qt5
	# we set path so it finds 'uic'
	export PATH="$PATH:/usr/lib/qt5/bin"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ssl \
		--with-gnutls \
		--with-qt=5 \
		--with-gtk=3 \
		--with-lua
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install
}

common() {
	local i
	pkgdesc="network protoccol analyzer - common files"
	mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/bin
	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|*-gtk) 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
}

gtk() {
	pkgdesc="wireshark - GTK GUI"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/wireshark-gtk "$subpkgdir"/usr/bin/
}

sha512sums="171047fa36a6cb29d1edb8e28086e24075f8b77581d9f3142fa39af8ae3d6dfe0c2e41a9335ca5d9851578b54ac9e6e74ff5bd92a96af262a5cc7a73857b8b81  wireshark-2.4.6.tar.xz
951677dd125b1e36b351cc87a98e8b8d0391d184c7695594dd4270334d86ada1dff5f14cd960da9c5d5d26fc801c42f0219b2db6269f3c526c841c7940d2f369  fix-udpdump.patch"