From 22acab0e689a84346e7d1374325ce3c479ea853e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 28 Oct 2005 09:46:07 +0000 Subject: Add spec file and target to make rpms for Mandriva --- Makefile.PL | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index c065851..f4f95cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,18 +1,41 @@ # $Id$ -# use 5.008; +use 5.008; +use strict; use ExtUtils::MakeMaker; -use Getopt::Long; + +# 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; + } + } +} +my $rpmtopdir = $rpm_path ? `$rpm_path --eval '%{_topdir}'` : ''; +chomp $rpmtopdir; sub MY::postamble { - <