void-packages/srcpkgs/rpm/template

57 lines
1.7 KiB
Bash
Raw Normal View History

# Template file for 'rpm'
pkgname=rpm
version=4.13.0.2
revision=1
build_style=gnu-configure
configure_args="--with-lua --with-cap --with-acl --with-external-db --enable-python PYTHON=python2"
hostmakedepends="pkg-config python-setuptools nss-devel nspr-devel automake"
makedepends="zlib-devel nspr-devel nss-devel bzip2-devel elfutils-devel file-devel popt-devel
libarchive-devel db-devel python-devel libcap-devel lua52-devel zstd-devel binutils-devel"
checkdepends="${makedepends}"
short_desc="Red Hat Package Management Utils"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="GPL-2"
homepage="http://rpm.org"
distfiles="http://ftp.rpm.org/releases/rpm-${version%.*.*}.x/rpm-${version}.tar.bz2"
checksum=2f3e2c07c354d16f2305ddd93ed030c8403d59b272f2fb6722445b091ff14194
conflicts="rpmextract>=0" # Both provide rpm2cpio
2017-12-18 06:52:27 +01:00
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python2.7"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nss"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nspr"
case "$XBPS_TARGET_MACHINE" in
# Musl requires gettext to be included and it's cflag added otherwise
# it fails with _nl_msg_cat_cntr undefined reference error
*-musl*)
2017-12-18 06:52:27 +01:00
makedepends+=" gettext-devel"
LDFLAGS+=" -lintl"
;;
esac
post_install() {
mv "${DESTDIR}"/bin/rpm "${DESTDIR}"/usr/bin/rpm
rm -r "${DESTDIR}"/bin
}
rpm-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
depends="${makedepends}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
rpm-python_package() {
short_desc+=" - python bindings"
depends="${sourcepkg}>=${version}_${revision}"
noarch=yes
pycompile_module="rpm"
pkg_install() {
vmove usr/lib/python2*
}
}