New package: rpm-4.13.0.2.

Closes: #8811 [via git-merge-pr]
This commit is contained in:
maxice8 2017-11-02 09:48:38 -02:00 committed by Jürgen Buchmüller
parent d34ad7264e
commit baf1e5ba7f
6 changed files with 104 additions and 0 deletions

View file

@ -2938,3 +2938,7 @@ libKF5KDcraw.so.5 libkdcraw5-17.04.3_1
libKF5Kipi.so.32.0.0 libkipi5-17.04.3_1
libfswatch.so.9 fswatch-1.11.2_1
libhackrf.so.0 libhackrf-2017.02.1_1
librpm.so.7 rpm-4.13.0.2_1
librpmsign.so.7 rpm-4.13.0.2_1
librpmbuild.so.7 rpm-4.13.0.2_1
librpmio.so.7 rpm-4.13.0.2_1

1
srcpkgs/rpm-devel Symbolic link
View file

@ -0,0 +1 @@
rpm

1
srcpkgs/rpm-python Symbolic link
View file

@ -0,0 +1 @@
rpm

View file

@ -0,0 +1,19 @@
--- configure.ac
+++ configure.ac
@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
# Check for libelf library. Prefer external, otherwise none.
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
+AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
AC_CHECK_HEADERS([gelf.h], [
AC_CHECK_LIB(elf, gelf_getvernaux, [
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
])
])
AC_SUBST(WITH_LIBELF_LIB)
-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
+AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes

View file

@ -0,0 +1,23 @@
--- tools/sepdebugcrcfix.c
+++ tools/sepdebugcrcfix.c
@@ -28,7 +28,19 @@
#include <error.h>
#include <libelf.h>
#include <gelf.h>
+#ifndef PACKAGE
+#define PACKAGE
+#ifndef PACKAGE_VERSION
+#define PACKAGE_VERSION
#include <bfd.h>
+#undef PACKAGE_VERSION
+#else
+#include <bfd.h>
+#endif
+#undef PACKAGE
+#else
+#include <bfd.h>
+#endif
#define _(x) x
#define static_assert(expr) \

56
srcpkgs/rpm/template Normal file
View file

@ -0,0 +1,56 @@
# 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
nocross="too buggy header detection and incompatible with musl fixes"
_EXTRA_INCLUDES=" -I/usr/include/nss -I/usr/include/nspr"
CFLAGS=" ${_EXTRA_INCLUDES}"
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*)
hostmakedepends+=" gettext-devel"
CFLAGS+=" -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*
}
}