aboutsummaryrefslogtreecommitdiffstats
path: root/community/libproxy/APKBUILD
blob: 1683134423a5487a720f3bf61cf0578da9d9c9cd (plain) (blame)
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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libproxy
pkgver=0.4.15
pkgrel=9
pkgdesc="Library handling all the details of proxy configuration"
url="https://github.com/libproxy/libproxy"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="zlib-dev"
makedepends="cmake python3-dev $depends_dev"
subpackages="$pkgname-dev $pkgname-bin py3-$pkgname:_py:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/libproxy/libproxy/archive/$pkgver.tar.gz
	CVE-2020-25219.patch::https://github.com/libproxy/libproxy/commit/836c10b60c65e947ff1e10eb02fbcc676d909ffa.patch
	CVE-2020-26154.patch::https://github.com/libproxy/libproxy/pull/126/commits/4411b523545b22022b4be7d0cac25aa170ae1d3e.patch
	"

# secfixes:
#   0.4.15-r9:
#     - CVE-2020-26154
#   0.4.15-r8:
#     - CVE-2020-25219

build() {
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DLIBEXEC_INSTALL_DIR=lib \
		-DMODULE_INSTALL_DIR=/usr/lib/libproxy/$pkgver/modules \
		-DWITH_PERL=OFF \
		-DWITH_PYTHON3=ON \
		-DPYTHON3_EXECUTABLE=/usr/bin/python3
	make -C build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make -C build DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}

bin() {
	pkgdesc="Binary to test libproxy"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

_py() {
	pkgdesc="Binding for libproxy and python 3"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="8f68bd56e44aeb3f553f4657bef82a5d14302780508dafa32454d6f724b724c884ceed6042f8df53a081d26ea0b05598cf35eab44823257c47c5ef8afb36442b  libproxy-0.4.15.tar.gz
908fbf49bec18764a8c2ab81ef5d5e6e1fc2423cf9a6608cc7d3a6d5ac44676e171646b0f95b39b7ade108afd62cc2ede8f7b57d6ba0d67025f30b18e5084292  CVE-2020-25219.patch
01c784a8016bb2a2bf5058b6af7fac29250542bfd4e0679a91fa223c821336d651f8f4a968763072edb86a78a743618c312a2daeb2963c8e5207109f2d26a18f  CVE-2020-26154.patch"