/[soft]/mga-mirrors/trunk/Makefile.PL
ViewVC logotype

Contents of /mga-mirrors/trunk/Makefile.PL

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6894 - (show annotations) (download)
Fri Dec 28 23:08:39 2012 UTC (11 years, 3 months ago) by boklm
File MIME type: text/plain
File size: 2133 byte(s)
Move mirrors/mga-mirrors to mga-mirrors


1 #!/usr/bin/env perl
2 # IMPORTANT: if you delete this file your app will not work as
3 # expected. You have been warned.
4 use inc::Module::Install;
5 use Module::Install::Catalyst; # Complain loudly if you don't have
6 # Catalyst::Devel installed or haven't said
7 # 'make dist' to create a standalone tarball.
8
9 name 'mga-mirrors';
10 all_from 'lib/MGA/Mirrors.pm';
11
12 requires 'Catalyst::Runtime' => '5.80000';
13 requires 'Catalyst::Plugin::ConfigLoader';
14 requires 'Catalyst::Plugin::Static::Simple';
15 requires 'Catalyst::Action::RenderView';
16 requires 'Catalyst::Plugin::Prototype';
17 requires 'Catalyst::Plugin::Session::State::Cookie';
18 requires 'Catalyst::Plugin::Session::Store::FastMmap';
19 requires 'Net::DNS';
20 requires 'Catalyst::View::GraphViz';
21 requires 'Moose';
22 requires 'namespace::autoclean';
23 requires 'Config::General'; # This should reflect the config file format you've chosen
24 # See Catalyst::Plugin::ConfigLoader for supported formats
25 test_requires 'Test::More' => '0.88';
26 catalyst;
27
28 install_script glob('script/*.pl');
29 install_script qw(bin/check_mirror);
30 auto_install;
31 WriteAll;
32
33 package MY;
34
35 sub install {
36 my ($self) = @_;
37
38 my $install = $self->SUPER::install;
39
40 $install =~ s/^(install ::.*)/$1 cron_install/m;
41
42 $install .= <<EOF;
43
44 cron_install ::
45 \t[ -d \$(DESTDIR)/etc/cron.d ] || mkdir -p \$(DESTDIR)/etc/cron.d
46 \tinstall -m644 etc/crontab \$(DESTDIR)/etc/cron.d/mga_mirrors
47 EOF
48
49 $install
50 }
51
52 sub postamble {
53
54 "
55 ChangeLog:
56 \tsvn log > ChangeLog
57
58 \$(DISTNAME).spec: \$(DISTNAME).spec.in Makefile
59 \tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
60
61 srpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
62 \trpmbuild -bs --clean\\
63 \t --define \"_sourcedir `pwd`\" \\
64 \t --define \"_specdir `pwd`\" \\
65 \t --define \"_srcrpmdir `pwd`\" \\
66 \t --define \"_rpmdir `pwd`\" \\
67 \t \$(DISTNAME).spec
68
69 rpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
70 \tmkdir ./noarch || :
71 \trpmbuild -ba --clean\\
72 \t --define \"_sourcedir `pwd`\" \\
73 \t --define \"_specdir `pwd`\" \\
74 \t --define \"_srcrpmdir `pwd`\" \\
75 \t --define \"_rpmdir `pwd`\" \\
76 \t \$(DISTNAME).spec
77 "
78 }

  ViewVC Help
Powered by ViewVC 1.1.30