aboutsummaryrefslogtreecommitdiffstats
path: root/main/libproxy/APKBUILD
blob: 65d9583d702e38509930b8674556cd60d9a5d689 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libproxy
pkgver=0.4.7
pkgrel=1
pkgdesc="A library handling all the details of proxy configuration"
url="http://code.google.com/p/libproxy/"
arch="all"
license="LGPLv2+"
depends=
depends_dev="zlib-dev"
makedepends="cmake python-dev $depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-bin py-$pkgname:py"
source="http://libproxy.googlecode.com/files/libproxy-$pkgver.tar.gz
	libproxy-0.4.7-unistd.patch"

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

build() {
	cd "$_builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DLIBEXEC_INSTALL_DIR=lib \
		-DMODULE_INSTALL_DIR=/usr/lib/libproxy/$pkgver/modules \
		-DWITH_PERL=OFF \
		./ || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/cmake "$subpkgdir"/usr/share/
}

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

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

md5sums="509e03a488a61cd62bfbaf3ab6a2a7a5  libproxy-0.4.7.tar.gz
e90c03f296e553ace347b46f4fea3625  libproxy-0.4.7-unistd.patch"