diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-01-16 18:02:11 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2008-01-16 18:02:11 +0000 |
commit | 60edb8acb0f88bf624122a70ba2030a4ac799cb1 (patch) | |
tree | f819258f135641c75af707d4e5224e226b8e45ce | |
parent | 0f27fa662af51b03e4dd6de0de1a78fc8d3186cb (diff) | |
download | perl-URPM-60edb8acb0f88bf624122a70ba2030a4ac799cb1.tar perl-URPM-60edb8acb0f88bf624122a70ba2030a4ac799cb1.tar.gz perl-URPM-60edb8acb0f88bf624122a70ba2030a4ac799cb1.tar.bz2 perl-URPM-60edb8acb0f88bf624122a70ba2030a4ac799cb1.tar.xz perl-URPM-60edb8acb0f88bf624122a70ba2030a4ac799cb1.zip |
start on work for rpm5 support
-rw-r--r-- | Makefile.PL | 7 | ||||
-rw-r--r-- | URPM.xs | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL index d4813d5..e2dc5d4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -18,7 +18,7 @@ defined $rpm_path or die "Can't find rpm on this system\n"; my $version = `LC_ALL=C $rpm_path --version`; chomp $version; -$version =~ s/RPM version //; +$version =~ s/(RPM version )|(rpm \(RPM\) )//; my $pversion = eval "v$version"; $pversion ge v4.2 or die "Unable to build URPM with too old (or undetected) rpm version $version\n"; @@ -58,7 +58,10 @@ if ($pversion ge v4.4.90 && $pversion lt v4.5) { push @rpmflags, '-DRPM_448'; } if ($pversion ge v4.5) { - push @rpmflags, '-DRPM_450'; + push @rpmflags, '-DRPM_450'; + } + if ($pversion ge v5.0.0) { + push @rpmflags, '-DRPM_500 -DWITH_DB'; } } my $ccflags = join(' ', '-Wall -fno-strict-aliasing', @rpmflags); @@ -54,7 +54,11 @@ typedef struct rpmSpec_s * Spec; #endif #include <rpm/rpmlib.h> +#ifdef RPM_500 +#include <rpm/rpmtag.h> +#else #include <rpm/header.h> +#endif #include <rpm/rpmio.h> #include <rpm/rpmdb.h> #include <rpm/rpmts.h> |