aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.PL3
-rw-r--r--NEWS2
-rw-r--r--URPM.xs10
3 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 50975b1..c1b8d2d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -53,6 +53,9 @@ if ($version =~ /^4\.4/ && (split(/\./, $version))[2] >= 6) {
if ($version =~ /^4\.4/ && (split(/\./, $version))[2] >= 8) {
$ccflags .= ' -DRPM_448';
}
+if ($version =~ /^4\.5/ && (split(/\./, $version))[2] >= 0) {
+ $ccflags .= ' -DRPM_CALLBACK_LONGLONG -DRPM_446 -DRPM_448 -DRPM_450';
+}
WriteMakefile(
NAME => 'URPM',
diff --git a/NEWS b/NEWS
index 89143a9..bc131b5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- rpm 4.5 support (thanks to peroyvind) (#35323)
+
Version 2.09 - 8 November 2007, by Pascal "Pixel" Rigaux
- use a simple function to return simple string list from header
diff --git a/URPM.xs b/URPM.xs
index a625f04..48b3358 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -30,6 +30,10 @@
#ifdef RPM_446
# define _RPMPS_INTERNAL
#endif
+#ifdef RPM_450
+# define _RPMEVR_INTERNAL
+#include <rpm/rpmevr.h>
+#endif
#include <rpm/rpmlib.h>
#include <rpm/header.h>
#include <rpm/rpmio.h>
@@ -3945,7 +3949,11 @@ Urpm_spec2srcheader(specfile)
SV *sv_pkg;
spec = rpmtsSetSpec(ts, NULL);
if (! spec->sourceHeader)
- initSourceHeader(spec);
+ initSourceHeader(spec
+#ifdef RPM_450
+ , NULL
+#endif
+ );
pkg = (URPM__Package)malloc(sizeof(struct s_Package));
memset(pkg, 0, sizeof(struct s_Package));
headerAddEntry(spec->sourceHeader, RPMTAG_SOURCERPM, RPM_INT32_TYPE, &zero, 1);