summaryrefslogtreecommitdiff
path: root/community/rpm/APKBUILD
blob: 376208a6b2c37be4de4562fad00780e0ddd8ad6f (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=rpm
pkgver=4.13.0.2
pkgrel=0
pkgdesc="The RPM package manager"
url="http://www.rpm.org/"
arch="all"
license="GPL2 LGPL2+"
depends_dev="nspr-dev nss-dev db-dev lua-dev zlib-dev bzip2-dev xz-dev
		libelf-dev file-dev popt-dev libcap-dev acl-dev libarchive-dev
		binutils-dev"
makedepends="$depends_dev graphviz gettext-dev python2-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py-rpm:py_rpm"
source="http://ftp.rpm.org/releases/rpm-4.13.x/$pkgname-$pkgver.tar.bz2"

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

build() {
	cd "$builddir"
	_EXT_CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss" \
	CFLAGS="$CFLAGS $_EXT_CPPFLAGS" CPPFLAGS="$CPPFLAGS $_EXT_CPPFLAGS" \
	LIBS="$LIBS -lintl" \
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-external-db \
		--with-cap --with-acl \
		--enable-python
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

py_rpm() {
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib
}

sha512sums="9b15acb2684bc963f7164763568615b2484478eaec0cea8b3bd4ddb94b862a70b2f4b4ab432d896e5885c9a191c4d7d2ede573a5feabc8ec290108956a8a4917  rpm-4.13.0.2.tar.bz2"