diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-07-26 06:23:12 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-07-26 06:23:12 +0000 |
commit | 08d33b92e7498f769fc7967ef74e31c08b59b200 (patch) | |
tree | 07621b0ad5428b84c35ea292c041f2921cb0a94d /Makefile.PL | |
parent | 933fcf9a134f3e2b75ceb3e64109de7266e56279 (diff) | |
download | perl-URPM-08d33b92e7498f769fc7967ef74e31c08b59b200.tar perl-URPM-08d33b92e7498f769fc7967ef74e31c08b59b200.tar.gz perl-URPM-08d33b92e7498f769fc7967ef74e31c08b59b200.tar.bz2 perl-URPM-08d33b92e7498f769fc7967ef74e31c08b59b200.tar.xz perl-URPM-08d33b92e7498f769fc7967ef74e31c08b59b200.zip |
* clean out compatibility code for older rpm versions that's not really
supported anymore anyways and move out as much as possible rpm5.org
compatibility code out of URPM into new rpm46compat.h @ rpm5.org
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL index 21823cb..9cda782 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -50,12 +50,14 @@ ChangeLog: } my @rpmflags; +my $ldflags; if ($hversion ge hexversion("4.4.90") && $hversion lt hexversion("4.7")) { # rpm.org version push @rpmflags, "-DRPM_ORG"; + $ldflags = '-lrpm -lrpmio -lrpmbuild'; } else { # rpm5.org version - push @rpmflags, "-DRPM_VERSION_CODE=$hversion"; + $ldflags = `pkg-config --libs rpm`; } my $ccflags = join(' ', '-Wall -fno-strict-aliasing', @rpmflags); @@ -68,7 +70,7 @@ WriteMakefile( }, CCFLAGS => $ccflags, VERSION_FROM => 'URPM.pm', - LIBS => [ '-lrpm -lrpmio -lrpmbuild' ], + LIBS => [ $ldflags ], INC => '-I/usr/include/rpm', dist => { COMPRESS => "bzip2", SUFFIX => ".bz2" }, realclean => { FILES => "t/RPMS/noarch/*" }, |