aboutsummaryrefslogtreecommitdiffstats
path: root/community/libproxy/APKBUILD
blob: 86edd7dd5da18937a2d32a45eed40d24d50b2782 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libproxy
pkgver=0.4.17
pkgrel=0
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
	"

# 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="589045538a78dc7453335ed61c60adad3352b840b224885d4a58ae284e52224ae3ff2eebd77df57aebbc3ae75d7b6d69a825f24f01c19e75bf0a3345dce53126  libproxy-0.4.17.tar.gz"