aboutsummaryrefslogtreecommitdiffstats
path: root/main/libproxy/APKBUILD
blob: d2895b090c6e1840de3754e0f89f012a73b1ef8e (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libproxy
pkgver=0.4.6
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"

_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="199c6b120baf1f7258a55f38d5ec74f5  libproxy-0.4.6.tar.gz"