source: LATMOS-Accounts/Makefile.PL @ 613

Last change on this file since 613 was 613, checked in by nanardon, 14 years ago
  • add la-search tool
File size: 2.1 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.1', # 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-config
30        bin/la-create
31        bin/la-crypt-passwd
32        bin/la-delete
33        bin/la-edit
34        bin/la-group
35        bin/la-guser
36        bin/la-passwd
37        bin/la-query
38        bin/la-search
39        bin/la-sync
40        bin/la-sync-manager
41        bin/la-warn-expire
42        ) ],
43);
44
45package MY;
46
47sub postamble {
48    <<EOF;
49.PHONY .= svnmanifest
50
51svnmanifest:
52\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
53
54ChangeLog:
55\tsvn log > ChangeLog
56
57latmos-accounts.spec: latmos-accounts.spec.in Makefile
58\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
59
60rpm: \$(DISTVNAME).tar.gz latmos-accounts.spec
61\tmkdir ./noarch || :
62\trpmbuild -ba --clean\\
63\t --define "_sourcedir `pwd`" \\
64\t --define "_specdir `pwd`" \\
65\t --define "_srcrpmdir `pwd`" \\
66\t --define "_rpmdir `pwd`" \\
67\t latmos-accounts.spec
68
69EOF
70}
71
72sub install {
73    my ($self) = @_;
74    my $section = $self->SUPER::install();
75
76    $section =~ s/(^install ::.*)/$1 install_config/m;
77
78    $section .= q{
79install_config ::
80        install -d $(DESTDIR)/etc
81        install sample/latmos-account.ini $(DESTDIR)/etc/latmos-account.ini
82};
83 
84    return $section;
85}
Note: See TracBrowser for help on using the repository browser.