aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.PL
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2009-01-20 15:24:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2009-01-20 15:24:15 +0000
commit353f8e87e241aa77fb1f28338011a66accafb2f8 (patch)
treedff1e2decd77697dd37a7a6eaaaeaed0d0accfbc /Makefile.PL
parent3df9af43cee16db36335ee2de9fde8dbb275a3d6 (diff)
downloadrpmtools-353f8e87e241aa77fb1f28338011a66accafb2f8.tar
rpmtools-353f8e87e241aa77fb1f28338011a66accafb2f8.tar.gz
rpmtools-353f8e87e241aa77fb1f28338011a66accafb2f8.tar.bz2
rpmtools-353f8e87e241aa77fb1f28338011a66accafb2f8.tar.xz
rpmtools-353f8e87e241aa77fb1f28338011a66accafb2f8.zip
- 5.95.9
- drop parsehdlist, rpm2header: unused, partially duplicated with perl-URPM - drop rpm2cpio.pl (doesn't handle lzma payload which is the default)
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL56
1 files changed, 2 insertions, 54 deletions
diff --git a/Makefile.PL b/Makefile.PL
index f8ab70e..cf61c9c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,61 +3,15 @@
use strict;
use ExtUtils::MakeMaker;
-my $rpmtools_version = "5.8";
+my $rpmtools_version = "5.9";
# where to find the rpm utility
-my $rpm_path = $ENV{RPM_PATH}; # this overrides
-
-unless (defined $rpm_path) {
- for (qw(/bin/rpm /usr/bin/rpm)) {
- if (-x) {
- $rpm_path = $_;
- last;
- }
- }
-}
-
-defined $rpm_path or die "Can't find rpm on this system\n";
-
-sub hexversion {
- my ($major, $minor, $micro) = (@_[0] =~ /(\d+)\.(\d+)\.?(\d+)?/);
- return int($major<<16) + int($minor<<8) + int($micro<<0)
-}
-
-my $version = `LC_ALL=C $rpm_path --version`;
-# fix compiling with RCs:
-$version =~ s/(-.*)|(\.DEVEL)//;
-chomp $version;
-$version =~ s/(RPM version )|(rpm \(RPM\) )//;
-my $hversion = hexversion($version);
-
-my @rpmflags;
-if ($hversion ge hexversion("4.4.90") && $hversion lt hexversion("4.5")) {
- # rpm.org version
- push @rpmflags, "-DRPM_ORG";
-} else {
- # rpm5.org version
- push @rpmflags, "-DRPM_VERSION_CODE=$hversion";
-}
-my $ccflags = join(' ', '-Wall -fno-strict-aliasing', @rpmflags);
-
-print "Found RPM version $version (compiling with flags: $ccflags)\n";
-
sub MY::postamble {
<<MAKEMAKEFILE;
.PHONY: ChangeLog
-\$(FROMCC): %: %.cc
- \$(CXX) \$(CCFLAGS) \$(OPTIMIZE) -DVERSION_STRING=\\"\$(RPMTOOLSVERSION)\\" $ccflags \$< \$(LIBRPM) \$(INCRPM) -o \$@
-
-\$(FROMC): %: %.c
- \$(CC) \$(CCFLAGS) \$(OPTIMIZE) -DVERSION_STRING=\\"\$(RPMTOOLSVERSION)\\" $ccflags \$< \$(LIBRPM) \$(INCRPM) -o \$@
-
-buildc: \$(FROMC) \$(FROMCC)
-
cleanc:
- rm -f \$(FROMC) \$(FROMCC)
rm -rf *.cz test
ChangeLog:
@@ -72,23 +26,17 @@ WriteMakefile(
VERSION => $rpmtools_version,
macro => {
RPMTOOLSVERSION => $rpmtools_version,
- FROMC => 'parsehdlist rpm2header #rpm-find-leaves',
- FROMCC => '#gendepslist2 hdlist2names hdlist2files hdlist2prereq hdlist2groups',
- LIBRPM => '-lrpm -lrpmio -lrpmdb -lrpmbuild -lz -lbz2 -lpopt',
- INCRPM => '-I/usr/include/rpm',
},
depend => {
clean_subdirs => 'cleanc',
- pm_to_blib => 'buildc',
},
PM => {
'packdrake.pm' => '$(INST_LIBDIR)/packdrake.pm',
},
- EXE_FILES => [ qw(gendistrib genhdlist-old genhdlist2 packdrake rpm2header parsehdlist rpm2cpio.pl dumpdistribconf) ],
+ EXE_FILES => [ qw(gendistrib genhdlist-old genhdlist2 packdrake dumpdistribconf) ],
C => [],
OBJECT => '',
CCFLAGS => '-Wall',
- OPTIMIZE => '-O3 -fomit-frame-pointer -fno-exceptions -pipe -s -ffast-math -fexpensive-optimizations',
INC => '',
LIBS => [ '' ],
INSTALLDIRS => 'vendor',