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