source: trunk/LATMOS-Accounts/Makefile.PL @ 1251

Last change on this file since 1251 was 1225, checked in by nanardon, 11 years ago

Add ssh fp support

This patch add support for SSH finger print DNS support. Nethost have now an
sshfp attribute to hold fingerprint. The fingerprint are added into DNS zones

This patch also make 'checkzone' test optional and not enable by default.

File size: 6.0 KB
RevLine 
[1]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',
[989]7    VERSION_FROM      => 'lib/LATMOS/Accounts.pm',
[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,
[861]23        'Net::IP' => undef,
[867]24        'Net::IPv4Addr' => undef,
25        'Net::IPv6Addr' => undef,
[258]26    }, # e.g., Module::Name => 1.1
[1]27    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
28      (ABSTRACT_FROM  => 'lib/LATMOS/Accounts.pm', # retrieve abstract from module
[254]29       AUTHOR         => 'Thauvin Olivier <olivier.thauvin@latmos.ipsl.fr>') : ()),
[416]30    EXE_FILES => [ qw(
31        bin/la-acls
[640]32        bin/la-qacls
[617]33        bin/la-attributes
[845]34        bin/la-cli
[416]35        bin/la-config
36        bin/la-create
[1005]37        bin/la-sql-crypt-passwd
[531]38        bin/la-delete
[416]39        bin/la-edit
[861]40        bin/la-find-expired
[416]41        bin/la-group
42        bin/la-guser
43        bin/la-passwd
44        bin/la-query
[715]45        bin/la-rename
[861]46        bin/la-rename-host
[1006]47        bin/la-sql-exchange-ip
[1007]48        bin/la-sql-rev
[613]49        bin/la-search
[416]50        bin/la-sync
[578]51        bin/la-sync-manager
[1201]52        bin/la-sync-ctl
[416]53        bin/la-warn-expire
[1197]54        bin/la-sql-freeip
[861]55        bin/la-expired-reminder
56        bin/la-sql-regatt
57        bin/la-sql-loadatt
[881]58        bin/la-sql-upgrade
[959]59        bin/la-sql-edit-form
[1225]60        bin/la-sql-updsshfp
[990]61        bin/la-test-mail
[416]62        ) ],
[861]63        macro => {
64            INSTALLMAN5DIR      => '$(PERLPREFIX)/share/man/man5',
[991]65            INSTALLMAN8DIR      => '$(PERLPREFIX)/share/man/man8',
[861]66            DESTINSTALLMAN5DIR  => '$(DESTDIR)$(INSTALLMAN5DIR)',
[991]67            DESTINSTALLMAN8DIR  => '$(DESTDIR)$(INSTALLMAN8DIR)',
[861]68            INST_MAN5DIR        => 'blib/man5',
[991]69            INST_MAN8DIR        => 'blib/man8',
[881]70            DESTRPMDIR          => '$(shell pwd)',
71            DATADIR             => '/usr/share/latmos-accounts',
72            DESTDATADIR         => '$(DESTDIR)$(DATADIR)',
[861]73        },
74        MAN1PODS        => {
75            map {
76                my $targ = $_;
[1013]77                $targ =~ s{^man/man(\d)}{};
78                my $section = $1 || 1;
[861]79                $targ =~ s{^bin/}{};
[1013]80                $targ =~ s/.pod$//;
[861]81                ( $_ =>
82                    "\$(INST_MAN${section}DIR)/$targ.$section" );
[1013]83            } <man/man?/*.pod>, (grep { ! /~$/ } <bin/*>)
[861]84        },
85
[1]86);
[416]87
88package MY;
89
90sub postamble {
91    <<EOF;
[861]92#.PHONY .= svnmanifest
[416]93
[881]94bin/la-sql-upgrade: bin/la-sql-upgrade.in
95\tcat \$< \| sed 's:\@DATADIR\@:\$(DATADIR):' > \$@
96\tchmod +x \$@
97
[416]98svnmanifest:
99\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
100
[432]101ChangeLog:
102\tsvn log > ChangeLog
103
104latmos-accounts.spec: latmos-accounts.spec.in Makefile
105\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
106
107rpm: \$(DISTVNAME).tar.gz latmos-accounts.spec
108\tmkdir ./noarch || :
109\trpmbuild -ba --clean\\
110\t --define "_sourcedir `pwd`" \\
111\t --define "_specdir `pwd`" \\
[861]112\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
113\t --define "_rpmdir \$(DESTRPMDIR)" \\
[432]114\t latmos-accounts.spec
115
[861]116svnrpm: \$(DISTVNAME).tar.gz latmos-accounts.spec
117\tmkdir \$(DESTRPMDIR)/noarch || :
118\trpmbuild -ba --clean\\
119\t --define "_sourcedir `pwd`" \\
120\t --define "_specdir `pwd`" \\
121\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
122\t --define "_rpmdir \$(DESTRPMDIR)" \\
123\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
124\t latmos-accounts.spec
125
[1009]126podhtml: \$(MAN1PODS) \$(MAN3PODS)
127\tmkdir html || :
128\trm -f html/*
129\tperl scripts/pod2xhtml.pl \$(MAN1PODS) \$(MAN3PODS)
130
[416]131EOF
132}
[548]133
[861]134sub installbin {
135    my $self = shift;
136    my $inherited = $self->SUPER::installbin(@_);
137    my $s = join '|', map quotemeta, @sbin_scripts;
138    # how to create needed directories under blib
[991]139    $inherited .= $self->dir_target("\$(INST_$_)") for qw(MAN5DIR MAN8DIR);
[861]140    $inherited;
141}
142
143sub top_targets {
144    my $inherited = shift->SUPER::top_targets(@_);
[991]145    $inherited =~ s/^config ::/$& \$(INST_MAN5DIR)\$(DIRFILESEP).exists \$(INST_MAN8DIR)\$(DIRFILESEP).exists/m;
[861]146    $inherited;
147}
148
[548]149sub install {
150    my ($self) = @_;
151    my $section = $self->SUPER::install();
152
[881]153    $section =~ s/(^install ::.*)/$1 install_config install_templates install_data/m;
[991]154    $section =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g;
[548]155
[705]156    $section .= q[
[548]157install_config ::
158        install -d $(DESTDIR)/etc
[861]159        install -d $(DESTDIR)/etc/latmos-accounts
160        install sample/latmos-accounts.ini $(DESTDIR)/etc/latmos-accounts/latmos-accounts.ini
161        install sample/la-sync-list.ini $(DESTDIR)/etc/latmos-accounts/la-sync-list.ini
162        install sample/la-allowed-values.ini $(DESTDIR)/etc/latmos-accounts/la-allowed-values.ini
163        install sample/la-sync-manager.ini $(DESTDIR)/etc/latmos-accounts/la-sync-manager.ini
[705]164
165install_templates ::
[881]166        install -d $(DESTDIR)$(DATADIR)/templates
[705]167        $(ABSPERLRUN) -MExtUtils::Install -e 'install({ templates => @ARGV })' \\
[881]168                $(DESTDIR)$(DATADIR)/templates
169
170install_data ::
171        install -d $(DESTDIR)$(DATADIR)
172        $(ABSPERLRUN) -MExtUtils::Install -e 'install({ sqldata => @ARGV })' \\
173            $(DESTDIR)$(DATADIR)
[705]174];
[548]175 
176    return $section;
177}
[1027]178
179sub test {
180    my $inherited = shift->SUPER::test(@_);
181
[1030]182    $inherited =~ s:^(test_dynamic .*):$1 test_scripts:m;
183
[1027]184    $inherited .= <<EOF;
185
186TESTLIVE_FILES = live-test/*.t
[1030]187TESTSCRIPTS_FILE = t/scripts.pl
[1027]188
189test_live :: pure_all
190\tPERL_DL_NONLAZY=1 \$(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" \$(TESTLIVE_FILES)
191
[1030]192test_scripts :: pure_all
193\tPERL_DL_NONLAZY=1 \$(FULLPERLRUN) "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)" \$(TESTSCRIPTS_FILE) \$(EXE_FILES)
[1027]194EOF
195    return $inherited;
196}
Note: See TracBrowser for help on using the repository browser.