Changeset 25


Ignore:
Timestamp:
11/23/10 16:22:22 (13 years ago)
Author:
nanardon
Message:
  • add default config file
Location:
server/trunk/web
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/Makefile.PL

    r24 r25  
    99name 'Sophie'; 
    1010all_from 'lib/Sophie.pm'; 
     11 
     12requires 'DBD::Pg'; 
     13requires 'DBIx::Class'; 
    1114 
    1215requires 'Catalyst::Runtime' => '5.80025'; 
     
    2225requires 'Catalyst::Plugin::Prototype' => '0'; 
    2326requires 'Catalyst::View::TT' => '0'; 
    24 requires 'DBD::Pg'; 
     27requires 'Catalyst::Plugin::Compress::Zlib'; 
     28requires 'Catalyst::Plugin::Server'; 
     29requires 'Catalyst::Plugin::Server::XMLRPC'; 
    2530requires 'Config::General'; # This should reflect the config file format you've chosen 
    2631                 # See Catalyst::Plugin::ConfigLoader for supported formats 
     
    3742 
    3843package MY; 
     44 
     45sub install { 
     46    my ($self) = @_; 
     47    my $section = $self->SUPER::install(); 
     48 
     49    $section =~ s/(^install ::.*)/$1 install_config/m; 
     50 
     51    $section .= qq[ 
     52install_config: sophie.conf.in 
     53\tinstall -d \$(DESTDIR)/etc 
     54\tinstall -d \$(DESTDIR)/etc/sophie 
     55\tinstall sophie.conf.in \$(DESTDIR)/etc/sophie/sophie.conf 
     56 
     57    ]; 
     58 
     59    $section 
     60} 
    3961 
    4062sub postamble { 
  • server/trunk/web/Sophie.spec.in

    r24 r25  
    2525BuildRequires: perl(Catalyst::Plugin::Prototype) 
    2626BuildRequires: perl(Catalyst::View::TT) 
     27BuildRequires: perl(DBIx::Class) 
     28BuildRequires: perl(Catalyst::Plugin::Compress::Zlib) 
     29BuildRequires: perl-Catalyst-Plugin-Server 
    2730 
    2831Requires: perl(Catalyst) 
     
    3639Requires: perl(Catalyst::Plugin::Prototype) 
    3740Requires: perl(Catalyst::View::TT) 
     41Requires: perl(Catalyst::Plugin::Compress::Zlib) 
     42Requires: perl-Catalyst-Plugin-Server 
    3843# Requires: apache-mod_fastcgi 
    3944# Requires: perl(FCGI) 
     
    6065%defattr(-,root,root) 
    6166%doc Changes README 
     67%dir %_sysconfdir/sophie 
     68%config(noreplace) %_sysconfdir/sophie/* 
    6269%_bindir/* 
    6370%{_mandir}/man3/* 
  • server/trunk/web/lib/Sophie/Base.pm

    r24 r25  
    2020   require Config::General; 
    2121   my $config; 
    22    foreach my $file ('sophie.conf', "$Bin/../sophie.conf") { 
     22   foreach my $file ('sophie.conf', "$Bin/../sophie.conf", 
     23       '/etc/sophie/sophie.conf') { 
    2324       -f $file or next; 
    2425        my $cg = Config::General->new($file); 
Note: See TracChangeset for help on using the changeset viewer.