Changeset 867 in ProjectBuilder for devel/pb-modules/Makefile.PL
- Timestamp:
- Oct 21, 2009, 11:48:11 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/Makefile.PL
r539 r867 1 1 use 5.006001; 2 2 use ExtUtils::MakeMaker; 3 use strict; 3 4 4 5 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 5 6 # the contents of the Makefile that is written. 6 7 WriteMakefile( 7 8 9 10 8 NAME => 'PBPKG', 9 DISTNAME => 'PBPKG', 10 VERSION => 'PBVER', 11 INST_SCRIPT => 'blib/bin', 11 12 INSTALLDIRS => 'perl', 12 13 PREREQ_PM => { 13 14 #HTTP::Headers => 1.59, 14 15 #Template => 0, 15 16 }, # e.g., Module::Name => 1.1 16 17 #ABSTRACT_FROM => 'bin/pb', # retrieve abstract from module 17 18 AUTHOR => 'Bruno Cornec <bruno#project-builder.org>', 18 19 EXE_FILES => [ qw( bin/pbdistrocheck ) ], 19 20 MAN3PODS => { 'lib/ProjectBuilder/Distribution.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Distribution.$(MAN3EXT)', … … 22 23 'lib/ProjectBuilder/Base.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Base.$(MAN3EXT)', }, 23 24 ); 25 26 package MY; 27 28 sub postamble { 29 30 # Determine location of etc conf files 31 my $text =""; 32 33 # Grab out any CONFDIR param 34 my $confdir = undef; 35 36 while (my $arg = shift @ARGV) { 37 my ($key, $value) = split /=/, $arg; 38 if ($key =~ /^CONFDIR$/) { 39 $confdir = $value; 40 } 41 } 42 43 my $etcdir = $confdir || "/usr/local/etc/pb"; 44 45 # Use that conf dir info to modify Distribution.pm 46 system("perl -pi -e \"s~CCCC~$etcdir~\" lib/ProjectBuilder/Distribution.pm"); 47 48 $text .= "install ::\n"; 49 $text .= "\t".'install -m 755 -d $(DESTDIR)'."$etcdir\n"; 50 $text .= "\t".'cp etc/pb.conf $(DESTDIR)'."$etcdir\n"; 51 return($text); 52 }
Note:
See TracChangeset
for help on using the changeset viewer.