summaryrefslogtreecommitdiffstats
path: root/RPM4/src/Makefile.PL
diff options
context:
space:
mode:
authornanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2005-10-04 04:08:46 +0000
committernanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2005-10-04 04:08:46 +0000
commit9e2966a33f9148fdc8ef81783bab1fe18e87bd34 (patch)
tree7497629483bdfca79e64991306f251dfdc9bdafb /RPM4/src/Makefile.PL
parent588601a22c421404c9db24e0a47330d2186977f9 (diff)
downloadperl-RPM4-9e2966a33f9148fdc8ef81783bab1fe18e87bd34.tar
perl-RPM4-9e2966a33f9148fdc8ef81783bab1fe18e87bd34.tar.gz
perl-RPM4-9e2966a33f9148fdc8ef81783bab1fe18e87bd34.tar.bz2
perl-RPM4-9e2966a33f9148fdc8ef81783bab1fe18e87bd34.tar.xz
perl-RPM4-9e2966a33f9148fdc8ef81783bab1fe18e87bd34.zip
- move to trunk
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@36 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/src/Makefile.PL')
-rw-r--r--RPM4/src/Makefile.PL48
1 files changed, 48 insertions, 0 deletions
diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL
new file mode 100644
index 0000000..9b9a60f
--- /dev/null
+++ b/RPM4/src/Makefile.PL
@@ -0,0 +1,48 @@
+# $Id$
+
+# use 5.008;
+use ExtUtils::MakeMaker;
+
+my ($obj, $ldd, $fl) =
+ -f '/usr/include/rpmconstant/rpmconstant.h' ?
+ ('', '-lrpmconstant', '-DHAVE_RPMCONSTANT') :
+ ('rpmconstant.o rpmconstant_internal.o rpmconstanttbl.o', '', '');
+
+sub MY::postamble {
+ my $first = <<RPMCONSTTBL;
+
+rpmconstanttbl.c: Makefile rpmh2tbl
+ perl rpmh2tbl /usr/include/rpm/*.h > \$@
+RPMCONSTTBL
+ # This code is to reduce duplication of files
+ # in fact it is only usefull for the maintainers of this module
+ # if you get the module from CPAN, those files are allready here
+ # if you're building from svn, you need rpmconstant directory
+ my $second = "";
+ if(-d '../../rpmconstant') {
+ $second = <<RPMCONST
+rpmconstant.c: ../../rpmconstant/rpmconstant.c
+ cp -a \$< \$@
+
+rpmconstant.h: ../../rpmconstant/rpmconstant.h
+ cp -a \$< \$@
+
+rpmconstant_internal.c: ../../rpmconstant/rpmconstant_internal.c
+ cp -a \$< \$@
+
+rpmh2tbl: ../../rpmconstant/rpmh2tbl
+ cp -a \$< \$@
+RPMCONST
+ }
+
+ $first . $second
+}
+
+WriteMakefile(
+ NAME => 'RPM4',
+ VERSION_FROM => '../lib/RPM4.pm',
+ OBJECT => "RPM4.o RPM4sign.o $obj",
+ INC => '-I/usr/include/rpm',
+ LIBS => "-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz -lbz2 $ldd",
+ 'CCFLAGS' => $fl,
+);