rev 1844 - trunk/buscador

[prev] [thread] [next] [lurker] [Date index for 2005/02/08]

From: simon
Subject: rev 1844 - trunk/buscador
Date: 12:56 on 08 Feb 2005
Author: simon
Date: 2005-02-08 12:56:34 +0000 (Tue, 08 Feb 2005)
New Revision: 1844

Added:
   trunk/buscador/Build.PL
   trunk/buscador/Root.pm.in
Log:
New Build system


Added: trunk/buscador/Build.PL
===================================================================
--- trunk/buscador/Build.PL	2005-02-08 12:55:51 UTC (rev 1843)
+++ trunk/buscador/Build.PL	2005-02-08 12:56:34 UTC (rev 1844)
@@ -0,0 +1,70 @@
+use strict;
+use lib qw(lib);
+use Buscador::Build;
+
+my $build = Buscador::Build->new(
+    module_name => "Buscador",
+    license     => "perl",
+    scripts     => [ 'bin/buscador-import' ],
+    requires    => {
+        'Apache::MVC'                 => 0,
+        'Cache::FileCache'            => 0,
+        'Class::DBI::Pager'           => 0,
+        'Date::Parse'                 => 0,
+        'Email::Find'                 => 0,
+        'Email::Store'                => 0.20,
+        'Email::Store::Summary'       => 0,
+        'Email::Store::NamedEntity'   => 0,
+        'Email::Store::Plucene'       => 0,
+        'Email::Store::Thread'        => 1.1,
+        'File::NCopy'                 => 0,
+        'HTML::Entities'              => 0,
+        'Mail::Thread::Chronological' => 0,
+        'Maypole::Cache'              => 0,
+        'Maypole::Redirect'           => 0,
+        'Module::Pluggable::Ordered'  => 0,
+        'Plucene'                     => 1.17,
+        'Sys::Hostname'               => 0,
+        'Text::Decorator'             => 1.2,
+        'Text::Context'               => 0,
+        'Time::Piece'                 => 0,
+        'URI::Find::Schemeless::Stricter' => 0,
+    },
+    create_makefile_pl => 'passthrough',
+    dynamic_config => 1,
+);
+
+$build->{config}{__extras_from} = [ 'templates', 'chrome' ];
+
+$|= 1;
+print "Checking for existing Buscador::Root... ";
+
+my $D_ROOT = '/usr/local/buscador';
+eval {
+    require Buscador::Root;
+    print "found. setting defaults based on existing install\n";
+    $D_ROOT = $Buscador::Root::root;
+};
+
+print "failed. selecting regular defaults\n"
+  if $@;
+
+my $ROOT = $build->prompt("where do we install to guv?", $D_ROOT);
+
+print "Generating Buscador::Root from your answers\n";
+open(IN,  "<Root.pm.in")
+  or die "couldn't open Root.pm.in: $!";
+open(OUT, ">lib/Buscador/Root.pm")
+  or die "couldn't open Root.pm for write: $!";
+while (<IN>) {
+    s'@@ROOT@@'$ROOT'e;
+    print OUT $_;
+}
+close IN  or die "error closing Root.pm.in: $!";
+close OUT or die "error closing Root.pm: $!";
+
+$build->{config}{__extras_destination} = $ROOT;
+
+$build->create_build_script;
+
+

Added: trunk/buscador/Root.pm.in
===================================================================
--- trunk/buscador/Root.pm.in	2005-02-08 12:55:51 UTC (rev 1843)
+++ trunk/buscador/Root.pm.in	2005-02-08 12:56:34 UTC (rev 1844)
@@ -0,0 +1,32 @@
+package Buscador::Root;
+
+use base qw(Exporter);
+our @EXPORT = qw($root);
+
+
+$root = '@@ROOT@@';
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Buscador::Root - information about where default Buscador files are installed
+
+=head1 SYNOPIS
+
+
+    require Buscador::Root;
+
+    print $Buscador::Root::root; # prints @@ROOT@@
+
+
+=head1 CREATION
+
+This file is autogenerated from Root.pm.in when you run Build.PL
+
+=cut
+

Generated at 13:00 on 08 Feb 2005 by mariachi 0.52