source: LATMOS-Accounts/Makefile.PL @ 838

Last change on this file since 838 was 838, checked in by nanardon, 14 years ago
  • take la-rev into account
File size: 2.5 KB
Line 
1use 5.010000;
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              => 'LATMOS::Accounts',
7    VERSION           => '0.0.25', # finds $VERSION
8    PREREQ_PM         => {
9        'Net::LDAP' => undef,
10        'Unicode::Map8' => undef,
11        'DBD::Pg' => undef,
12        'Crypt::RSA' => undef,
13        'MIME::Base64' => undef,
14        'Term::ReadKey' => undef,
15        'Config::IniFiles' => undef,
16        'Mail::Sendmail' => undef,
17        'Net::DNS' => undef,
18        'Template' => undef,
19        'Sys::Syslog' => undef,
20        'Pod::Usage' => undef,
21        'Unicode::String' => undef,
22        'Crypt::Cracklib' => undef,
23    }, # e.g., Module::Name => 1.1
24    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
25      (ABSTRACT_FROM  => 'lib/LATMOS/Accounts.pm', # retrieve abstract from module
26       AUTHOR         => 'Thauvin Olivier <olivier.thauvin@latmos.ipsl.fr>') : ()),
27    EXE_FILES => [ qw(
28        bin/la-acls
29        bin/la-qacls
30        bin/la-attributes
31        bin/la-config
32        bin/la-create
33        bin/la-crypt-passwd
34        bin/la-delete
35        bin/la-edit
36        bin/la-group
37        bin/la-guser
38        bin/la-passwd
39        bin/la-query
40        bin/la-rename
41        bin/la-rev
42        bin/la-search
43        bin/la-sync
44        bin/la-sync-list
45        bin/la-sync-manager
46        bin/la-warn-expire
47        bin/la-web-directory
48        ) ],
49);
50
51package MY;
52
53sub postamble {
54    <<EOF;
55.PHONY .= svnmanifest
56
57svnmanifest:
58\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
59
60ChangeLog:
61\tsvn log > ChangeLog
62
63latmos-accounts.spec: latmos-accounts.spec.in Makefile
64\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
65
66rpm: \$(DISTVNAME).tar.gz latmos-accounts.spec
67\tmkdir ./noarch || :
68\trpmbuild -ba --clean\\
69\t --define "_sourcedir `pwd`" \\
70\t --define "_specdir `pwd`" \\
71\t --define "_srcrpmdir `pwd`" \\
72\t --define "_rpmdir `pwd`" \\
73\t latmos-accounts.spec
74
75EOF
76}
77
78sub install {
79    my ($self) = @_;
80    my $section = $self->SUPER::install();
81
82    $section =~ s/(^install ::.*)/$1 install_config install_templates/m;
83
84    $section .= q[
85install_config ::
86        install -d $(DESTDIR)/etc
87        install sample/latmos-account.ini $(DESTDIR)/etc/latmos-account.ini
88
89install_templates ::
90        install -d $(DESTDIR)/usr/share/latmos-accounts/templates
91        $(ABSPERLRUN) -MExtUtils::Install -e 'install({ templates => @ARGV })' \\
92                $(DESTDIR)/usr/share/latmos-accounts/templates
93];
94 
95    return $section;
96}
Note: See TracBrowser for help on using the repository browser.