aboutsummaryrefslogtreecommitdiffstats
path: root/extra/db46/APKBUILD
blob: d7fc61e51347acd17d4c1caeb82ea4b7252b9744 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=db46
pkgver=4.6.21
pkgrel=4
pkgdesc="The Berkeley DB embedded database system 4.6"
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
license="custom"
depends="uclibc"
subpackages="$pkgname-dev $pkgname-doc"
# Patches were found here:
# http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.html
source="http://download-uk.oracle.com/berkeley-db/db-$pkgver.tar.gz
	patch.$pkgver.1
	patch.$pkgver.2
	patch.$pkgver.3
	patch.$pkgver.4
	"

build () { 
	cd "$srcdir"/db-$pkgver
	for i in ../patch.*; do
		msg "Applying $i..."
		patch -p0 < $i || return 1
	done

	cd build_unix
	../dist/configure --prefix=/usr \
		--mandir=/usr/share/man \
		--includedir=/usr/include/db4.6 \
		--enable-compat185 \
		--enable-shared \
		--disable-static \
		--disable-cxx
	make LIBSO_LIBS=-lpthread || return 1
	make DESTDIR="$pkgdir" install

	cd "$pkgdir"/usr/bin
	for i in db_*; do
		mv $i db4.6_${i#db_}
	done

	cd "$pkgdir"/usr/lib
	rm libdb.so libdb-4.so

	mkdir -p "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/docs "$pkgdir"/usr/share/doc/$pkgname

	install -D -m644 "$srcdir"/db-$pkgver/LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

md5sums="718082e7e35fc48478a2334b0bc4cd11  db-4.6.21.tar.gz
4878872edfc53c6ecb871b1062a4bdaf  patch.4.6.21.1
55074e53d3acae2dcbeae8322f96e522  patch.4.6.21.2
4ccd6c9e296fb448f7ffe352fe740507  patch.4.6.21.3
ae7d3d587355fe85b512ef09b9a77d19  patch.4.6.21.4"