aboutsummaryrefslogtreecommitdiffstats
path: root/main/apr-util/APKBUILD
blob: 7768dbe68eb87baf58d2ebfcd63c57738b044d9d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apr-util
pkgver=1.5.2
pkgrel=0
pkgdesc="The Apache Portable Runtime Utility Library"
url="http://apr.apache.org/"
arch="all"
license="APACHE"
depends=
subpackages="$pkgname-dev $pkgname-dbm_db $pkgname-dbd_pgsql
	$pkgname-dbd_sqlite3 $pkgname-ldap"
makedepends="apr-dev expat-dev bash openldap-dev sqlite-dev postgresql-dev
	db-dev"
depends_dev="expat-dev apr-dev openldap-dev sqlite-dev postgresql-dev
	db-dev"
source="http://www.apache.org/dist/apr/$pkgname-$pkgver.tar.bz2"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-apr=/usr \
		--with-ldap \
		--with-pgsql \
		--with-sqlite3 \
		--with-berkeley-db \
		--without-iconv \
		--without-sqlite2 \
		--without-gdbm \
		|| return 1

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/apr-util*/*.la \
		"$pkgdir"/usr/lib/*.exp \
		"$pkgdir"/usr/lib/*.la || return 1
}

_mv_mod() {
	pkgdesc="The Apache Portable Runtime Utility Library - $2 driver"
	depends=
	local _moddir="usr/lib/apr-util-1"
	mkdir -p "$subpkgdir"/$_moddir
	mv "$pkgdir"/$_moddir/apr_$1*.so "$subpkgdir"/$_moddir/
}

dbm_db() { _mv_mod dbm_db "Berkley DB"; }
dbd_pgsql() { _mv_mod dbd_pgsql "PostgreSQL"; }
dbd_mysql() { _mv_mod dbd_mysql "MySQL"; }
dbd_sqlite3() { _mv_mod dbd_sqlite "SQLite3"; }
ldap() { _mv_mod ldap "LDAP"; }

md5sums="89c1348aa79e898d7c34a6206311c9c2  apr-util-1.5.2.tar.bz2"
sha256sums="9ace3d2e3129d5c244ef695a88b3b47897695e8e6ca2b96e92e4a635d9ed12a7  apr-util-1.5.2.tar.bz2"
sha512sums="14e890aa1a34369ddf0d041d397231e21994c0a51d3a07dd126985699184ee59c2df32dd752339dd90278988a9461c714f0a157126229be57450259646a1d6df  apr-util-1.5.2.tar.bz2"