source: trunk/LA-Tools/Makefile.PL @ 2472

Last change on this file since 2472 was 2191, checked in by nanardon, 5 years ago

Add specfile for remote tools

File size: 1.6 KB
Line 
1use 5.020001;
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              => 'LA::Tools',
7    VERSION           => '0.1', # finds $VERSION, requires EU::MM from perl >= 5.5
8    PREREQ_PM         => {
9        'LWP::UserAgent' => undef,
10        'JSON'           => undef,
11        'Getopt::Long'   => undef,
12        'Pod::Usage'     => undef,
13    }, # e.g., Module::Name => 1.1
14    ABSTRACT          => 'External Tools for LATMOS::Accounts', # retrieve abstract from module
15    AUTHOR            => 'Olivier Thauvin <olivier.thauvin@latmos.ipsl.fr>',
16    EXE_FILES         => [ qw(
17        bin/rla-sshkey
18    ) ],
19        macro => {
20                DESTRPMDIR          => '$(shell pwd)',
21        },
22
23    #LICENSE           => 'perl',
24    #Value must be from legacy list of licenses here
25    #http://search.cpan.org/perldoc?Module%3A%3ABuild%3A%3AAPI
26);
27
28package MY;
29
30sub postamble {
31
32<<EOF;
33
34la-tools.spec: la-tools.spec.in Makefile
35\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
36
37rpm: \$(DISTVNAME).tar.gz la-tools.spec
38\tmkdir ./noarch || :
39\trpmbuild -ba --clean\\
40\t --define "_sourcedir `pwd`" \\
41\t --define "_specdir `pwd`" \\
42\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
43\t --define "_rpmdir \$(DESTRPMDIR)" \\
44\t la-tools.spec
45
46svnrpm: \$(DISTVNAME).tar.gz la-tools.spec
47\tmkdir \$(DESTRPMDIR)/noarch || :
48\trpmbuild -ba --clean\\
49\t --define "_sourcedir `pwd`" \\
50\t --define "_specdir `pwd`" \\
51\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
52\t --define "_rpmdir \$(DESTRPMDIR)" \\
53\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
54\t la-tools.spec
55
56EOF
57
58}
Note: See TracBrowser for help on using the repository browser.