void-packages/srcpkgs/rpm/template
mobinmob 6427049d9e rpm: update to 4.17.0.
- lua is always required, so remove config arg
- no longer uses Berkeley DB or NSS

By ericonr:
- clean up musl: add CFLAGS for gettext includes; add musl-legacy-compat
to allow us to compile the libelf integration (was previously disabled
on musl)
- use >= for versioning deps

Closes: #34219 [via git-merge-pr]
2021-11-28 03:07:43 -03:00

88 lines
2.4 KiB
Bash

# Template file for 'rpm'
pkgname=rpm
version=4.17.0
revision=1
build_style=gnu-configure
# configure checks sys.version[:3] for Python versioning, so 3.10 becomes 3.1;
# until this is fixed upstream, manually define am_cv_python_version to circumvent
configure_args="--with-cap --with-acl
--enable-python PYTHON=python3 --sharedstatedir=/var/lib
am_cv_python_version=${py3_ver}"
hostmakedepends="automake gettext-devel libtool pkg-config
python3-setuptools"
makedepends="libgcrypt-devel binutils-devel elfutils-devel file-devel libarchive-devel
libcap-devel lua53-devel popt-devel python3-devel libgomp-devel sqlite-devel"
short_desc="Red Hat Package Management Utils"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://rpm.org"
changelog="https://rpm.org/wiki/Releases/${version}.html"
distfiles="https://ftp.osuosl.org/pub/rpm/releases/rpm-${version%.*}.x/rpm-${version}.tar.bz2"
checksum=2e0d220b24749b17810ed181ac1ed005a56bbb6bc8ac429c21f314068dc65e6a
python_version=3
conflicts="rpmextract>=0" # Both provide rpm2cpio
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
case "$XBPS_TARGET_MACHINE" in
# rpm uses _nl_msg_cat_cntr, so it needs the glibc gettext impl
# it uses <error.h> header, provided by legacy-compat
*-musl)
makedepends+=" gettext-devel musl-legacy-compat"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gettext"
LDFLAGS="-lintl"
;;
esac
pre_configure() {
autoreconf -fi
}
librpm-devel_package() {
depends="librpm>=${version}_${revision} librpmbuild>=${version}_${revision}
librpmsign>=${version}_${revision} librpmio>=${version}_${revision} sqlite-devel
popt-devel liblzma-devel zlib-devel bzip2-devel libgcrypt-devel lua53-devel"
short_desc+=" - development files"
depends="${makedepends}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
rpm-python3_package() {
depends="rpm"
short_desc+=" - python bindings"
pkg_install() {
vmove usr/lib/python3*
}
}
librpm_package() {
short_desc+=" - rpm library"
pkg_install() {
vmove "usr/lib/librpm.so.*"
}
}
librpmbuild_package() {
short_desc+=" - rpmbuild library"
pkg_install() {
vmove "usr/lib/librpmbuild.so.*"
}
}
librpmsign_package() {
short_desc+=" - rpmsign library"
pkg_install() {
vmove "usr/lib/librpmsign.so.*"
}
}
librpmio_package() {
short_desc+=" - rpmio library"
pkg_install() {
vmove "usr/lib/librpmio.so.*"
}
}