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

Last change on this file since 58 was 58, checked in by nanardon, 14 years ago
  • auto document XML::RPC functions
File size: 2.8 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 'Pod::Find';
34requires 'Pod::Pom';
35requires 'Config::General'; # This should reflect the config file format you've chosen
36                 # See Catalyst::Plugin::ConfigLoader for supported formats
37test_requires 'Test::More' => '0.88';
38catalyst;
39
40install_script glob('script/*.pl');
41
42WriteMakefile(
43    macro => { 
44        DESTRPMDIR => '$(shell pwd)',
45    },
46);
47
48package MY;
49
50sub install {
51    my ($self) = @_;
52    my $section = $self->SUPER::install();
53
54    $section =~ s/(^install ::.*)/$1 install_config/m;
55
56    $section .= qq[
57install_config: sophie.conf.in
58\tinstall -d \$(DESTDIR)/etc
59\tinstall -d \$(DESTDIR)/etc/sophie
60\tinstall sophie.conf.in \$(DESTDIR)/etc/sophie/sophie.conf
61
62    ];
63
64    $section
65}
66
67sub postamble {
68    <<EOF;
69# .PHONY .= svnmanifest
70
71svnmanifest:
72\tsvn ls -R| grep -v "/\$\$"  > MANIFEST
73
74ChangeLog:
75\tsvn log > ChangeLog
76
77\$(DISTNAME).spec: \$(DISTNAME).spec.in Makefile
78\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
79
80rpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
81\tmkdir \$(DESTRPMDIR)/noarch || :
82\trpmbuild -ba --clean\\
83\t --define "_sourcedir `pwd`" \\
84\t --define "_specdir `pwd`" \\
85\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
86\t --define "_rpmdir \$(DESTRPMDIR)" \\
87\t \$(DISTNAME).spec
88
89svnrpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
90\tmkdir \$(DESTRPMDIR)/noarch || :
91\trpmbuild -ba --clean\\
92\t --define "_sourcedir `pwd`" \\
93\t --define "_specdir `pwd`" \\
94\t --define "_srcrpmdir \$(DESTRPMDIR)" \\
95\t --define "_rpmdir \$(DESTRPMDIR)" \\
96\t --define "svnrelease `LC_ALL=C svn info | grep '^Revision:' | sed 's/Revision: //'`" \\
97\t \$(DISTNAME).spec
98
99EOF
100}
Note: See TracBrowser for help on using the repository browser.