diff options
author | Francois Pons <fpons@mandriva.com> | 2003-04-29 17:16:45 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-04-29 17:16:45 +0000 |
commit | 60031191b7012fdfe8e1af6bd43ff9b36b0c5825 (patch) | |
tree | 398598eb74a6fa2df317dcae75af8d06f4b917f3 /Makefile.PL | |
parent | dda88bb6d1e792766d518edd4c23df6936e92a01 (diff) | |
download | perl-URPM-60031191b7012fdfe8e1af6bd43ff9b36b0c5825.tar perl-URPM-60031191b7012fdfe8e1af6bd43ff9b36b0c5825.tar.gz perl-URPM-60031191b7012fdfe8e1af6bd43ff9b36b0c5825.tar.bz2 perl-URPM-60031191b7012fdfe8e1af6bd43ff9b36b0c5825.tar.xz perl-URPM-60031191b7012fdfe8e1af6bd43ff9b36b0c5825.zip |
first try of 4.2 compatible perl-URPM,
missing verify_signature,
new version 0.83
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL index eba032e..93453b0 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,12 +2,22 @@ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. +my $version = `rpm -q --qf '%{VERSION}\n' rpm`; +$version =~ /^(?:[4-9]|\d{2})/ or die "unable to build URPM with too old (or undetected) rpm version $version"; + +#- search for correct libraries to use (above 4.0.3 is right). +my $libs = $version =~ /^4\.0(?:\.[012])?$/ ? + '-lrpm -lrpmio -lpopt -lz -lbz2' : '-lrpm -lrpmio -lrpmdb -lpopt -lz -lbz2'; +my $define = $version =~ /^(?:4\.[2-9]|[5-9]|\d{2})/ ? '-DRPM_42' : ''; + WriteMakefile( 'NAME' => 'URPM', + 'CCFLAGS' => '-Wall', 'OPTIMIZE' => '-O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -ffast-math -fexpensive-optimizations', 'MAKEFILE' => 'Makefile', 'OBJECT' => 'URPM.o', 'VERSION_FROM' => 'URPM.pm', - 'LIBS' => ['-lrpm -lrpmio -lrpmdb -lpopt -lz -lbz2'], # e.g., '-lm' + 'LIBS' => [ $libs ], # e.g., '-lm' + 'DEFINE' => $define, 'INC' => '-I/usr/include/rpm', # e.g., '-I/usr/include/other' ); |