aboutsummaryrefslogtreecommitdiffstats
path: root/community/rpm/APKBUILD
blob: 19c6e884aae8eace38764494c2a908f99fe1070c (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=rpm
pkgver=4.13.1
pkgrel=0
pkgdesc="Redhat Package Management utilities (RPM)"
url="http://www.rpm.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
depends_dev="acl-dev binutils-dev bzip2-dev db-dev file-dev libarchive-dev
	libcap-dev libelf-dev lua-dev nspr-dev nss-dev popt-dev xz-dev zlib-dev"
makedepends="$depends_dev gettext-dev graphviz python2-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py-rpm:py_rpm"
source="http://ftp.rpm.org/releases/$pkgname-${pkgver%.*}.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="3aa3fc6ec0c2199058708f24b42672db831a96c89981bca1669b2e39c2427f0afb7ec36075e47aebecf4ff3627434f4ca47ba617b6f552c85e7bfde5c6f5c647  rpm-4.13.1.tar.bz2"