source: ProjectBuilder/devel/pb-modules/Makefile.PL@ 969

Last change on this file since 969 was 969, checked in by Bruno Cornec, 14 years ago
  • Fix a bug for suffix computation, following the change of interface for pb_distro_get_param
  • pbdistrocheck now has a man page. Build files adapted accordingly
File size: 1.7 KB
Line 
1use 5.006001;
2use ExtUtils::MakeMaker;
3use strict;
4
5# See lib/ExtUtils/MakeMaker.pm for details of how to influence
6# the contents of the Makefile that is written.
7WriteMakefile(
8 NAME => 'PBPKG',
9 DISTNAME => 'PBPKG',
10 VERSION => 'PBVER',
11 INST_SCRIPT => 'blib/bin',
12 INSTALLDIRS => 'perl',
13 PREREQ_PM => {
14 #HTTP::Headers => 1.59,
15 #Template => 0,
16 }, # e.g., Module::Name => 1.1
17 #ABSTRACT_FROM => 'bin/pb', # retrieve abstract from module
18 AUTHOR => 'Bruno Cornec <bruno#project-builder.org>',
19 EXE_FILES => [ qw( bin/pbdistrocheck ) ],
20 MAN1PODS => { 'bin/pbdistrocheck' => '$(INST_MAN1DIR)/pbdistrocheck.$(MAN1EXT)', },
21 MAN3PODS => { 'lib/ProjectBuilder/Distribution.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Distribution.$(MAN3EXT)',
22 'lib/ProjectBuilder/Conf.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Conf.$(MAN3EXT)',
23 'lib/ProjectBuilder/Display.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Display.$(MAN3EXT)',
24 'lib/ProjectBuilder/Base.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Base.$(MAN3EXT)', },
25);
26
27package MY;
28
29sub postamble {
30
31 # Determine location of etc conf files
32 my $text ="";
33
34 # Grab out any CONFDIR param
35 my $confdir = undef;
36
37 while (my $arg = shift @ARGV) {
38 my ($key, $value) = split /=/, $arg;
39 if ($key =~ /^CONFDIR$/) {
40 $confdir = $value;
41 }
42 }
43
44 my $etcdir = $confdir || "/usr/local/etc/pb";
45
46 # Use that conf dir info to modify Distribution.pm
47 system("perl -pi -e \"s~CCCC~$etcdir~\" lib/ProjectBuilder/Distribution.pm");
48
49 $text .= "install ::\n";
50 $text .= "\t".'mkdir -p $(DESTDIR)'."$etcdir\n";
51 $text .= "\t".'chmod 755 $(DESTDIR)'."$etcdir\n";
52 $text .= "\t".'cp etc/pb.conf $(DESTDIR)'."$etcdir\n";
53 return($text);
54}
Note: See TracBrowser for help on using the repository browser.