source: server/trunk/web/Makefile.PL @ 24

Last change on this file since 24 was 24, checked in by nanardon, 14 years ago
  • add make rpm target
File size: 2.1 KB
Line 
1#!/usr/bin/env perl
2# IMPORTANT: if you delete this file your app will not work as
3# expected.  You have been warned.
4use inc::Module::Install;
5use 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
9name 'Sophie';
10all_from 'lib/Sophie.pm';
11
12requires 'Catalyst::Runtime' => '5.80025';
13requires 'Catalyst::Plugin::ConfigLoader';
14requires 'Catalyst::Plugin::Static::Simple';
15requires 'Catalyst::Action::RenderView';
16requires 'Moose';
17requires 'namespace::autoclean';
18requires 'Catalyst::Plugin::Authentication' => '0';
19requires 'Catalyst::Plugin::Session' => '0';
20requires 'Catalyst::Plugin::Session::Store::DBI' => '0';
21requires 'Catalyst::Plugin::Session::State::Cookie' => '0';
22requires 'Catalyst::Plugin::Prototype' => '0';
23requires 'Catalyst::View::TT' => '0';
24requires 'DBD::Pg';
25requires 'Config::General'; # This should reflect the config file format you've chosen
26                 # See Catalyst::Plugin::ConfigLoader for supported formats
27test_requires 'Test::More' => '0.88';
28catalyst;
29
30install_script glob('script/*.pl');
31
32WriteMakefile(
33    macro => { 
34        DESTRPMDIR => '$(shell pwd)',
35    },
36);
37
38package MY;
39
40sub postamble {
41    <<EOF;
42# .PHONY .= svnmanifest
43
44svnmanifest:
45\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
46
47ChangeLog:
48\tsvn log > ChangeLog
49
50\$(DISTNAME).spec: \$(DISTNAME).spec.in Makefile
51\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
52
53rpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
54\tmkdir \$(DESTRPMDIR)/noarch || :
55\trpmbuild -ba --clean\\
56\t --define "_sourcedir `pwd`" \\
57\t --define "_specdir `pwd`" \\
58\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
59\t --define "_rpmdir \$(DESTRPMDIR)" \\
60\t \$(DISTNAME).spec
61
62svnrpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
63\tmkdir \$(DESTRPMDIR)/noarch || :
64\trpmbuild -ba --clean\\
65\t --define "_sourcedir `pwd`" \\
66\t --define "_specdir `pwd`" \\
67\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
68\t --define "_rpmdir \$(DESTRPMDIR)" \\
69\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
70\t \$(DISTNAME).spec
71
72EOF
73}
Note: See TracBrowser for help on using the repository browser.