source: trunk/Link-Accounts-Remote/Makefile.PL @ 1178

Last change on this file since 1178 was 870, checked in by nanardon, 13 years ago
  • add XML::RPC interface to website
  • add XML::RPC clients project
    • add tools to allow user to change their password
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1use 5.014002;
2use ExtUtils::MakeMaker;
3# See lib/ExtUtils/MakeMaker.pm for details of how to influence
4# the contents of the Makefile that is written.
5WriteMakefile(
6    NAME              => 'Link::Accounts::Remote',
7    VERSION_FROM      => 'lib/Link/Accounts/Remote.pm', # finds $VERSION
8    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
9    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
10      (ABSTRACT_FROM  => 'lib/Link/Accounts/Remote.pm', # retrieve abstract from module
11       AUTHOR         => 'Olivier Thauvin <olivier.thauvin@latmos.ipsl.fr>') : ()),
12    macro             => {
13        DESTRPMDIR    => '$(shell pwd)'
14    },
15    EXE_FILES         => [ qw(
16        bin/la-chpasswd       
17    ) ]
18);
19
20package MY;
21
22sub postamble {
23    <<EOF;
24#.PHONY .= svnmanifest
25
26svnmanifest:
27\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
28
29ChangeLog:
30\tsvn log > ChangeLog
31
32link-accounts-remote.spec: link-accounts-remote.spec.in Makefile
33\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
34
35rpm: \$(DISTVNAME).tar.gz link-accounts-remote.spec
36\tmkdir ./noarch || :
37\trpmbuild -ba --clean\\
38\t --define "_sourcedir `pwd`" \\
39\t --define "_specdir `pwd`" \\
40\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
41\t --define "_rpmdir \$(DESTRPMDIR)" \\
42\t link-accounts-remote.spec
43
44svnrpm: \$(DISTVNAME).tar.gz link-accounts-remote.spec
45\tmkdir \$(DESTRPMDIR)/noarch || :
46\trpmbuild -ba --clean\\
47\t --define "_sourcedir `pwd`" \\
48\t --define "_specdir `pwd`" \\
49\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
50\t --define "_rpmdir \$(DESTRPMDIR)" \\
51\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
52\t link-accounts-remote.spec
53
54EOF
55}
56
57sub installbin {
58    my $self = shift;
59    my $inherited = $self->SUPER::installbin(@_);
60    # how to create needed directories under blib
61    #$inherited .= $self->dir_target("\$(INST_$_)") for qw(MAN5DIR);
62    $inherited;
63}
64
65sub top_targets {
66    my $inherited = shift->SUPER::top_targets(@_);
67    #$inherited =~ s/^config ::/$& \$(INST_MAN5DIR)\$(DIRFILESEP).exists/m;
68    $inherited;
69}
70
71sub install {
72    my ($self) = @_;
73    my $section = $self->SUPER::install();
74
75    $section =~ s/(^install ::.*)/$1 install_config/m;
76    $section =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR)/g;
77
78    $section .= q[
79
80install_config ::
81        install -d $(DESTDIR)/etc
82
83];
84 
85    return $section;
86}
Note: See TracBrowser for help on using the repository browser.