void-packages/srcpkgs/rpm/template

62 lines
1.7 KiB
Bash

# Template file for 'rpm'
pkgname=rpm
version=4.13.1
revision=1
build_style=gnu-configure
configure_args="--with-lua --with-cap --with-acl --with-external-db --enable-python PYTHON=python2"
hostmakedepends="automake gettext-devel libtool nss-devel pkg-config
python-setuptools"
makedepends="binutils-devel db-devel elfutils-devel file-devel libarchive-devel
libcap-devel lua52-devel nss-devel popt-devel python-devel"
checkdepends="${makedepends}"
short_desc="Red Hat Package Management Utils"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="GPL-2.0-or-later"
homepage="http://rpm.org"
distfiles="http://ftp.rpm.org/releases/rpm-${version%.*}.x/rpm-${version}.tar.bz2"
checksum=81e5bc8e46baa0710a19c7d9bb34c24baceefeeafd86a9033e1e4d9613bb5b60
conflicts="rpmextract>=0" # Both provide rpm2cpio
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*)
makedepends+=" gettext-devel"
LDFLAGS+=" -lintl"
;;
esac
pre_configure() {
autoreconf -fi
}
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*
}
}