summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrjray <devnull@localhost>2001-04-29 22:44:13 +0000
committerrjray <devnull@localhost>2001-04-29 22:44:13 +0000
commitb4056f2affde298b4940054cc569534ac54a4624 (patch)
treeb41bd179077e68b4ca81c868c5f66910c31b2c64
parent81ac89f4e6f176f9095e73b34d94d4ccf12da237 (diff)
downloadlibrpm-tizen-b4056f2affde298b4940054cc569534ac54a4624.tar.gz
librpm-tizen-b4056f2affde298b4940054cc569534ac54a4624.tar.bz2
librpm-tizen-b4056f2affde298b4940054cc569534ac54a4624.zip
Made some changes to how rpm version is represented, added a new -Ddefine to
the c-flags. CVS patchset: 4726 CVS date: 2001/04/29 22:44:13
-rw-r--r--Perl-RPM/Makefile.PL13
1 files changed, 7 insertions, 6 deletions
diff --git a/Perl-RPM/Makefile.PL b/Perl-RPM/Makefile.PL
index e88bed72c..a06865900 100644
--- a/Perl-RPM/Makefile.PL
+++ b/Perl-RPM/Makefile.PL
@@ -1,6 +1,6 @@
#!/bin/perl
-# $Id: Makefile.PL,v 1.21 2001/04/27 09:07:08 rjray Exp $
+# $Id: Makefile.PL,v 1.22 2001/04/29 22:44:13 rjray Exp $
use Config;
use ExtUtils::MakeMaker;
@@ -56,15 +56,16 @@ chomp($rpm_version = qx($rpm_binary --version));
$rpm_version = (reverse split(/ /, $rpm_version))[0];
@rpm_version = split(/\./, $rpm_version);
push(@rpm_version, '0') unless (@rpm_version > 2);
-$rpm_version = join('', map { sprintf "%03d", $_ } @rpm_version);
-$rpm_version =~ s/^0*//;
+$rpm_version = sprintf '0x%02x'.'%02x'x$#rpm_version, @rpm_version;
die "RPM version must be at least 3.0.4, due to I/O features not available
prior to that version. Stopped"
- unless ($rpm_version >= 3000004);
+ # The stringification is because Perl is still treating $rpm_version as a
+ # string
+ unless ($rpm_version >= "0x030004");
# Starting with RPM 4.0, there are a number of subtle-but-significant changes
$rpm_defines = "-DRPM_MAJOR=$rpm_version[0] -DRPM_MINOR=$rpm_version[1]" .
- " -DRPM_PATCH=$rpm_version[2]";
-if ($rpm_version >= 4000000)
+ " -DRPM_PATCH=$rpm_version[2] -DRPM_VERSION=$rpm_version";
+if ($rpm_version >= "0x040000")
{
$rpm_libs = '-lrpm -lrpmio -lpopt';
}