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

Last change on this file since 37 was 37, checked in by nanardon, 14 years ago
  • requirements
File size: 2.7 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 'DBD::Pg';
13requires 'DBIx::Class';
14
15requires 'Catalyst::Runtime' => '5.80025';
16requires 'Catalyst::Plugin::ConfigLoader';
17requires 'Catalyst::Plugin::Static::Simple';
18requires 'Catalyst::Action::RenderView';
19requires 'Moose';
20requires 'namespace::autoclean';
21requires 'Catalyst::Plugin::Authentication' => '0';
22requires 'Catalyst::Plugin::Session' => '0';
23requires 'Catalyst::Plugin::Session::Store::DBI' => '0';
24requires 'Catalyst::Plugin::Session::State::Cookie' => '0';
25requires 'Catalyst::Plugin::Prototype' => '0';
26requires 'Catalyst::Plugin::Compress::Zlib';
27requires 'Catalyst::Plugin::Server';
28requires 'Catalyst::Plugin::Server::XMLRPC';
29requires 'Catalyst::View::TT' => '0';
30requires 'Catalyst::View::JSON' => '0';
31requires 'Catalyst::Model::DBIC::Schema';
32requires 'Catalyst::Authentication::Store::DBIx::Class';
33requires 'Config::General'; # This should reflect the config file format you've chosen
34                 # See Catalyst::Plugin::ConfigLoader for supported formats
35test_requires 'Test::More' => '0.88';
36catalyst;
37
38install_script glob('script/*.pl');
39
40WriteMakefile(
41    macro => { 
42        DESTRPMDIR => '$(shell pwd)',
43    },
44);
45
46package MY;
47
48sub install {
49    my ($self) = @_;
50    my $section = $self->SUPER::install();
51
52    $section =~ s/(^install ::.*)/$1 install_config/m;
53
54    $section .= qq[
55install_config: sophie.conf.in
56\tinstall -d \$(DESTDIR)/etc
57\tinstall -d \$(DESTDIR)/etc/sophie
58\tinstall sophie.conf.in \$(DESTDIR)/etc/sophie/sophie.conf
59
60    ];
61
62    $section
63}
64
65sub postamble {
66    <<EOF;
67# .PHONY .= svnmanifest
68
69svnmanifest:
70\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
71
72ChangeLog:
73\tsvn log > ChangeLog
74
75\$(DISTNAME).spec: \$(DISTNAME).spec.in Makefile
76\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
77
78rpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
79\tmkdir \$(DESTRPMDIR)/noarch || :
80\trpmbuild -ba --clean\\
81\t --define "_sourcedir `pwd`" \\
82\t --define "_specdir `pwd`" \\
83\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
84\t --define "_rpmdir \$(DESTRPMDIR)" \\
85\t \$(DISTNAME).spec
86
87svnrpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
88\tmkdir \$(DESTRPMDIR)/noarch || :
89\trpmbuild -ba --clean\\
90\t --define "_sourcedir `pwd`" \\
91\t --define "_specdir `pwd`" \\
92\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
93\t --define "_rpmdir \$(DESTRPMDIR)" \\
94\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
95\t \$(DISTNAME).spec
96
97EOF
98}
Note: See TracBrowser for help on using the repository browser.