summaryrefslogtreecommitdiffstats
path: root/RPM4/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4/Makefile.PL')
-rw-r--r--RPM4/Makefile.PL36
1 files changed, 36 insertions, 0 deletions
diff --git a/RPM4/Makefile.PL b/RPM4/Makefile.PL
new file mode 100644
index 0000000..95d5d33
--- /dev/null
+++ b/RPM4/Makefile.PL
@@ -0,0 +1,36 @@
+# $Id$
+
+# use 5.008;
+use ExtUtils::MakeMaker;
+use Getopt::Long;
+
+#- require at least rpm 4.2
+my $rpm_version = `rpm --version`;
+$rpm_version =~ s/RPM version //;
+$rpm_version =~ /^(?:[5-9]|\d{2}|4\.[2-9])/
+ or die <<BARF;
+Unable to build Hdlist with too old (or undetected) rpm version $rpm_version
+BARF
+
+sub MY::postamble {
+ <<MAKECHANGELOG;
+.PHONY: ChangeLog
+
+ChangeLog:
+ svn update && svn log --verbose > \$@
+
+rpm: dist
+ rpm --rmsource --define "_sourcedir `pwd`" -ba perl-Hdlist.spec
+MAKECHANGELOG
+}
+
+WriteMakefile(
+ NAME => 'RPM4',
+ VERSION_FROM => 'lib/RPM4.pm',
+ DIR => [ 'src' ],
+ 'EXE_FILES' => [ qw(bin/rpm_produced bin/rpmresign bin/hrpmreb) ],
+ dist => {
+ COMPRESS => 'bzip2 --best',
+ SUFFIX => '.bz2',
+ },
+);