Update of /cvsroot/fink/experimental/thesin/finkinfo/test
In directory sc8-pr-cvs1:/tmp/cvs-serv17492

Added Files:
        squirrelmail-1.4.0-1.info squirrelmail-1.4.0-1.patch 
Log Message:
just needs php4

--- NEW FILE: squirrelmail-1.4.0-1.info ---
Package: squirrelmail
Version: 1.4.0
Revision: 1
###
Depends: apache | httpd, php4 | php4-cgi, aspell | ispell
Suggests imap-server
###
Source: mirror:sourceforge:%n/%n-%v.tar.bz2
Source-MD5: c24a483b65cae773107a442026744f7f
###
PatchScript: sed 's|@FINKPREFIX@|%p|g' < %a/%f.patch | patch -p1
###
DocFiles: AUTHORS COPYING ChangeLog INSTALL README* ReleaseNotes UPGRADE
ConfFiles: <<
  %p/etc/squirrelmail/apache.conf
  %p/etc/squirrelmail/sqspell_config.php
<<
###
CompileScript: <<
#!/bin/sh
  echo "No compile needed" 
<<
InstallScript: <<
#!/bin/sh
  mkdir -p %i/etc/squirrelmail
  mkdir -p %i/share/squirrelmail
  mkdir -p %i/var/spool/squirrelmail
  mkdir -p %i/var/lib/squirrelmail

  PREFIX=%i/share/squirrelmail

  install -d -m 0755 $PREFIX
  for i in class include functions help images index.php locale plugins po src themes; 
do \
    cp -R $i $PREFIX ;\
  done

  install -d -m 0755 %i/etc/squirrelmail
  install -m 664 config/* %i/etc/squirrelmail/
  ln -s %p/etc/squirrelmail $PREFIX/config

  mv $PREFIX/plugins/squirrelspell/sqspell_config.php %i/etc/squirrelmail/
  ln -s %p/etc/squirrelmail/sqspell_config.php 
$PREFIX/plugins/squirrelspell/sqspell_config.php

  install -d -m 0730 -o root -g www %i/var/spool/squirrelmail/attach
  ln -s %p/var/spool/squirrelmail/attach $PREFIX/attach

  install -d -m 0730 -o root -g www %i/var/lib/squirrelmail/data
  ln -s %p/var/lib/squirrelmail/data $PREFIX/data
  cp data/* %i/var/lib/squirrelmail/data
<<
###
PostInstScript: <<
case "$1" in
  configure)
    chown root.www %p/var/lib/squirrelmail/data %p/var/spool/squirrelmail/attach
    chmod 0730 %p/var/lib/squirrelmail/data %p/var/spool/squirrelmail/attach

    if [ ! -f %p/etc/squirrelmail/config.php ]; then
      echo "Installing default squirrelmail config."
      cp %p/etc/squirrelmail/config_default.php %p/etc/squirrelmail/config.php
    fi
    echo "Run %p/etc/squirrelmail/conf.pl to reconfigure squirrelmail."
  ;;

  abort-upgrade|abort-remove|abort-deconfigure)
  ;;

  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 0
  ;;
esac
<<
###
PostRmScript: <<
#!/bin/sh
case "$1" in
  purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    # remove squirrelmail config if purging
    if [ "$1" = "purge" ] ; then
      rm -rf %p/etc/squirrelmail
    fi
  ;;

  *)
    echo "postrm called with unknown argument \`$1'" >&2
    exit 0
  ;;
esac

if [ "$1" = purge -a -e %p/share/debconf/confmodule ]; then
  . %p/share/debconf/confmodule
  db_purge
fi
<<
###
Description: Webmail for nuts
DescDetail: <<
  SquirrelMail is a standards-based webmail package written in PHP4. It
  includes built-in pure PHP support for the IMAP and SMTP protocols, and
  all pages render in pure HTML 4.0 (with no Javascript) for maximum
  compatibility across browsers. It has very few requirements and is very
  easy to configure and install. SquirrelMail has all the functionality
  you would want from an email client, including strong MIME support,
  address books, and folder manipulation.
<<
###
License: GPL
Maintainer: Justin F. Hallett <[EMAIL PROTECTED]>
Homepage: http://squirrelmail.org/

--- NEW FILE: squirrelmail-1.4.0-1.patch ---
--- squirrelmail-1.4.0.orig/config/conf.pl
+++ squirrelmail-1.4.0/config/conf.pl
@@ -45,8 +45,8 @@
 ############################################################              
 # First, lets read in the data already in there...
 ############################################################              
-if ( -e "config.php" ) {
-    open( FILE, "config.php" );
+if ( -e "@FINKPREFIX@/etc/squirrelmail/config.php" ) {
+    open( FILE, "@FINKPREFIX@/etc/squirrelmail/config.php" );
     while ( $line = <FILE> ) {
         $line =~ s/^\s+//;
         $line =~ s/^\$//;
@@ -97,9 +97,9 @@
     }
 
     $config = 1;
-    open( FILE, "config.php" );
-} elsif ( -e "config_default.php" ) {
-    open( FILE, "config_default.php" );
+    open( FILE, "@FINKPREFIX@/etc/squirrelmail/config.php" );
+} elsif ( -e "@FINKPREFIX@/etc/squirrelmail/config_default.php" ) {
+    open( FILE, "@FINKPREFIX@/etc/squirrelmail/config_default.php" );
     while ( $line = <FILE> ) {
         $line =~ s/^\s+//;
         $line =~ s/^\$//;
@@ -149,7 +149,7 @@
         $print_config_version = $config_version;
     }
     $config = 2;
-    open( FILE, "config_default.php" );
+    open( FILE, "@FINKPREFIX@/etc/squirrelmail/config_default.php" );
 } else {
     print "No configuration file found. Please get config_default.php\n";
     print "or config.php before running this again. This program needs\n";
@@ -176,8 +176,8 @@
             $sub = $options[0];
             $sub =~ s/\]\[['|"]PATH['|"]\]//;
             $sub =~ s/.*\[//;
-            if ( -e "../themes" ) {
-                $options[1] =~ s/^\.\.\/config/\.\.\/themes/;
+            if ( -e "@FINKPREFIX@/share/squirrelmail/themes" ) {
+                $options[1] =~ s/^\.\.\/config//;
             }
             $theme_path[$sub] = &change_to_rel_path($options[1]);
         } elsif ( $options[0] =~ /^theme\[[0-9]+\]\[['|"]NAME['|"]\]/ ) {
@@ -371,6 +371,20 @@
     exit(0);
 }
 
+if ($ARGV[0] eq '--install-plugin') {
+  print "Installing plugin " . $ARGV[1] . "\n";
+  push @plugins, $ARGV[1];
+  save_data();
+  exit(0);
+}
+
+if ($ARGV[0] eq '--remove-plugin') {
+  print "Removing plugin " . $ARGV[1] . "\n";
+  @plugins = grep(!/$ARGV[1]/, @plugins);
+  save_data();
+  exit(0);
+}
+
 #####################################################################################
 if ( $config_use_color == 1 ) {
     $WHT = "\x1B[37;1m";
@@ -560,12 +574,12 @@
             print "    $num. $plugins[$count]\n";
         }
         print "\n  Available Plugins:\n";
-        opendir( DIR, "../plugins" );
+        opendir( DIR, "@FINKPREFIX@/share/squirrelmail/plugins" );
         @files          = readdir(DIR);
         $pos            = 0;
         @unused_plugins = ();
         for ( $i = 0 ; $i <= $#files ; $i++ ) {
-            if ( -d "../plugins/" . $files[$i] && $files[$i] !~ /^\./ && $files[$i] 
ne "CVS" ) {
+            if ( -d "@FINKPREFIX@/share/squirrelmail/plugins/" . $files[$i] && 
$files[$i] !~ /^\./ && $files[$i] ne "CVS" ) {
                 $match = 0;
                 for ( $k = 0 ; $k <= $#plugins ; $k++ ) {
                     if ( $plugins[$k] eq $files[$i] ) {
@@ -2219,8 +2233,6 @@
             $name = <STDIN>;
             $name =~ s/[\r|\n]//g;
             $theme_name[ $#theme_name + 1 ] = $name;
-            print "Be sure to put ../themes/ before the filename.\n";
-            print "What file is this stored in (ex: ../themes/default_theme.php): ";
             $name = <STDIN>;
             $name =~ s/[\r|\n]//g;
             $theme_path[ $#theme_path + 1 ] = $name;
@@ -2254,12 +2266,12 @@
         } elsif ( $input =~ /^\s*t\s*/i ) {
             print "\nStarting detection...\n\n";
 
-            opendir( DIR, "../themes" );
+            opendir( DIR, "@FINKPREFIX@/share/squirrelmail/themes" );
             @files = grep { /\.php$/i } readdir(DIR);
             $cnt = 0;
             while ( $cnt <= $#files ) {
-                $filename = "../themes/" . $files[$cnt];
-                if ( $filename ne "../themes/index.php" ) {
+                $filename = $files[$cnt];
+                if ( $filename ne "index.php" ) {
                     $found = 0;
                     for ( $x = 0 ; $x <= $#theme_path ; $x++ ) {
                         if ( $theme_path[$x] eq $filename ) {
@@ -2280,7 +2292,7 @@
             print "\n";
             for ( $cnt = 0 ; $cnt <= $#theme_path ; $cnt++ ) {
                 $filename = $theme_path[$cnt];
-                if ( !( -e $filename ) ) {
+                if ( !( -e '@FINKPREFIX@/share/squirrelmail/themes/' . $filename ) ) {
                     print "  Removing $filename (file not found)\n";
                     $offset         = 0;
                     @new_theme_name = ();
@@ -2632,7 +2644,7 @@
 
 sub save_data {
     $tab = "    ";
-    if ( open( CF, ">config.php" ) ) {
+    if ( open( CF, ">@FINKPREFIX@/squirrelmail/config.php" ) ) {
         print CF "<?php\n";
         print CF "\n";
 
--- squirrelmail-1.4.0.orig/config/config_default.php
+++ squirrelmail-1.4.0/config/config_default.php
@@ -220,7 +220,7 @@
  *   $data_dir = '../data/';
  */
 global $data_dir;
-$data_dir = '../data/';
+$data_dir = '@FINKPREFIX@/var/lib/squirrelmail/data/';
 
 /**
  * Path to directory used for storing attachments while a mail is
@@ -236,7 +236,7 @@
  *    + It should probably be another directory than data_dir.
  */
 global $attachment_dir;
-$attachment_dir = "$data_dir";
+$attachment_dir = "@FINKPREFIX@/var/spool/squirrelmail/attach/";
 
 /* Hash level used for data directory. */
 global $dir_hash_level;
--- squirrelmail-1.4.0.orig/config/apache.conf
+++ squirrelmail-1.4.0/config/apache.conf
@@ -0,0 +1,14 @@
+Alias /squirrelmail @FINKPREFIX@/share/squirrelmail
+
+<Directory @FINKPREFIX@/share/squirrelmail>
+#  php_value register_globals On # refer to Debian bug #128226
+  php_flag register_globals on
+  Options Indexes FollowSymLinks
+</Directory>
+
+# users will prefer a simple URL like http://webmail.example.com
+#<VirtualHost 1.2.3.4>
+#  DocumentRoot @FINKPREFIX@/share/squirrelmail
+#  ServerName webmail.example.com
+#</VirtualHost>
+
--- squirrelmail-1.4.0.orig/doc/plugin.txt
+++ squirrelmail-1.4.0/doc/plugin.txt
@@ -299,7 +299,7 @@
      */
      
     chdir('..');
-    include('../src/validate.php');
+    require_once('../src/validate.php');
     
 The validate.php script will include internationalization support,
 config.php variables, strings.php functions, and also authenticate that the
@@ -311,7 +311,7 @@
 
 After that, if you need further functions, just use
 
-  include('../functions/filename.php');
+  require_once('../functions/filename.php');
   
 in your script.  Since 1.0.5, it was no longer necessary (nor recommended)
 to use the "if (! isset($filename_php))" syntax.




-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to