source: bot/trunk/Makefile.PL @ 453

Last change on this file since 453 was 405, checked in by nanardon, 12 years ago
  • cleanup the mess between tools and bot
File size: 2.1 KB
Line 
1use 5.012002;
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              => 'Sophie::Bot',
7    VERSION_FROM      => 'lib/Sophie/Bot.pm', # finds $VERSION
8    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
9    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
10      (ABSTRACT_FROM  => 'lib/Sophie/Bot.pm', # retrieve abstract from module
11       AUTHOR         => 'Olivier Thauvin <nanardon@nanardon.zarb.org>') : ()),
12    EXE_FILES => [ qw(
13        bin/sophie-bot
14    ) ],
15    macro => {
16        INSTALLMAN5DIR      => '$(PERLPREFIX)/share/man/man5',
17        DESTINSTALLMAN5DIR  => '$(DESTDIR)$(INSTALLMAN5DIR)',
18        INST_MAN5DIR        => 'blib/man5',
19        DESTRPMDIR          => '$(shell pwd)'
20    },
21);
22
23package MY;
24
25sub postamble {
26    <<EOF;
27#.PHONY .= svnmanifest
28
29svnmanifest:
30\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
31
32ChangeLog:
33\tsvn log > ChangeLog
34
35sophie-bot.spec: sophie-bot.spec.in Makefile
36\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
37
38rpm: \$(DISTVNAME).tar.gz sophie-bot.spec
39\tmkdir ./noarch || :
40\trpmbuild -ba --clean\\
41\t --define "_sourcedir `pwd`" \\
42\t --define "_specdir `pwd`" \\
43\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
44\t --define "_rpmdir \$(DESTRPMDIR)" \\
45\t sophie-bot.spec
46
47svnrpm: \$(DISTVNAME).tar.gz sophie-bot.spec
48\tmkdir \$(DESTRPMDIR)/noarch || :
49\trpmbuild -ba --clean\\
50\t --define "_sourcedir `pwd`" \\
51\t --define "_specdir `pwd`" \\
52\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
53\t --define "_rpmdir \$(DESTRPMDIR)" \\
54\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
55\t sophie-bot.spec
56
57EOF
58}
59
60sub installbin {
61    my $self = shift;
62    my $inherited = $self->SUPER::installbin(@_);
63    $inherited;
64}
65
66sub top_targets {
67    my $inherited = shift->SUPER::top_targets(@_);
68    $inherited;
69}
70
71sub install {
72    my ($self) = @_;
73    my $section = $self->SUPER::install();
74
75    $section =~ s/(^install ::.*)/$1 install_config install_templates/m;
76
77    $section .= q[
78install_config ::
79
80install_templates ::
81];
82 
83    return $section;
84}
Note: See TracBrowser for help on using the repository browser.