Adding RPM-related files.
authorgraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 27 Mar 2003 03:08:16 +0000 (03:08 +0000)
committergraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 27 Mar 2003 03:08:16 +0000 (03:08 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4686 7612ce4b-ef26-0410-bec9-ea0150e637f0

contrib/RPM/config.php.redhat [new file with mode: 0644]
contrib/RPM/squirrelmail.conf [new file with mode: 0644]
contrib/RPM/squirrelmail.cron [new file with mode: 0644]
contrib/RPM/squirrelmail.spec [new file with mode: 0644]

diff --git a/contrib/RPM/config.php.redhat b/contrib/RPM/config.php.redhat
new file mode 100644 (file)
index 0000000..d646dc7
--- /dev/null
@@ -0,0 +1,177 @@
+<?php
+
+/**
+ * SquirrelMail Configuration File
+ * Created using the configure script, conf.pl
+ */
+
+global $version;
+$config_version = '1.4.0';
+$config_use_color = 1;
+
+$org_name      = "SquirrelMail";
+$org_logo      = SM_PATH . 'images/sm_logo.png';
+$org_logo_width  = '308';
+$org_logo_height = '111';
+$org_title     = "SquirrelMail $version";
+$signout_page  = '';
+$frame_top     = '_top';
+
+$provider_uri     = 'http://www.squirrelmail.org/';
+
+$provider_name     = 'SquirrelMail';
+
+$motd = "";
+
+$squirrelmail_default_language = 'en_US';
+
+$domain                 = 'localhost';
+$imapServerAddress      = 'localhost';
+$imapPort               = 143;
+$useSendmail            = true;
+$smtpServerAddress      = 'localhost';
+$smtpPort               = 25;
+$sendmail_path          = '/usr/sbin/sendmail';
+$pop_before_smtp        = false;
+$imap_server_type       = 'uw';
+$invert_time            = false;
+$optional_delimiter     = '/';
+
+$default_folder_prefix          = 'mail/';
+$trash_folder                   = 'Trash';
+$sent_folder                    = 'Sent';
+$draft_folder                   = 'Drafts';
+$default_move_to_trash          = true;
+$default_move_to_sent           = true;
+$default_save_as_draft          = true;
+$show_prefix_option             = true;
+$list_special_folders_first     = true;
+$use_special_folder_color       = true;
+$auto_expunge                   = true;
+$default_sub_of_inbox           = false;
+$show_contain_subfolders_option = true;
+$default_unseen_notify          = 2;
+$default_unseen_type            = 1;
+$auto_create_special            = true;
+$delete_folder                  = false;
+$noselect_fix_enable            = false;
+
+$default_charset          = 'iso-8859-1';
+$data_dir                 = '__PREFSDIR__';
+$attachment_dir           = '__ATTDIR__';
+$dir_hash_level           = 0;
+$default_left_size        = '150';
+$force_username_lowercase = false;
+$default_use_priority     = true;
+$hide_sm_attributions     = false;
+$default_use_mdn          = true;
+$edit_identity            = true;
+$edit_name                = true;
+$allow_thread_sort        = true;
+$allow_server_sort        = true;
+$allow_charset_search     = true;
+$uid_support              = true;
+
+$plugins[0] = 'delete_move_next';
+$plugins[1] = 'squirrelspell';
+$plugins[2] = 'newmail';
+
+$theme_css = '';
+$theme_default = 0;
+$theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php';
+$theme[0]['NAME'] = 'Default';
+$theme[1]['PATH'] = SM_PATH . 'themes/plain_blue_theme.php';
+$theme[1]['NAME'] = 'Plain Blue';
+$theme[2]['PATH'] = SM_PATH . 'themes/sandstorm_theme.php';
+$theme[2]['NAME'] = 'Sand Storm';
+$theme[3]['PATH'] = SM_PATH . 'themes/deepocean_theme.php';
+$theme[3]['NAME'] = 'Deep Ocean';
+$theme[4]['PATH'] = SM_PATH . 'themes/slashdot_theme.php';
+$theme[4]['NAME'] = 'Slashdot';
+$theme[5]['PATH'] = SM_PATH . 'themes/purple_theme.php';
+$theme[5]['NAME'] = 'Purple';
+$theme[6]['PATH'] = SM_PATH . 'themes/forest_theme.php';
+$theme[6]['NAME'] = 'Forest';
+$theme[7]['PATH'] = SM_PATH . 'themes/ice_theme.php';
+$theme[7]['NAME'] = 'Ice';
+$theme[8]['PATH'] = SM_PATH . 'themes/seaspray_theme.php';
+$theme[8]['NAME'] = 'Sea Spray';
+$theme[9]['PATH'] = SM_PATH . 'themes/bluesteel_theme.php';
+$theme[9]['NAME'] = 'Blue Steel';
+$theme[10]['PATH'] = SM_PATH . 'themes/dark_grey_theme.php';
+$theme[10]['NAME'] = 'Dark Grey';
+$theme[11]['PATH'] = SM_PATH . 'themes/high_contrast_theme.php';
+$theme[11]['NAME'] = 'High Contrast';
+$theme[12]['PATH'] = SM_PATH . 'themes/black_bean_burrito_theme.php';
+$theme[12]['NAME'] = 'Black Bean Burrito';
+$theme[13]['PATH'] = SM_PATH . 'themes/servery_theme.php';
+$theme[13]['NAME'] = 'Servery';
+$theme[14]['PATH'] = SM_PATH . 'themes/maize_theme.php';
+$theme[14]['NAME'] = 'Maize';
+$theme[15]['PATH'] = SM_PATH . 'themes/bluesnews_theme.php';
+$theme[15]['NAME'] = 'BluesNews';
+$theme[16]['PATH'] = SM_PATH . 'themes/deepocean2_theme.php';
+$theme[16]['NAME'] = 'Deep Ocean 2';
+$theme[17]['PATH'] = SM_PATH . 'themes/blue_grey_theme.php';
+$theme[17]['NAME'] = 'Blue Grey';
+$theme[18]['PATH'] = SM_PATH . 'themes/dompie_theme.php';
+$theme[18]['NAME'] = 'Dompie';
+$theme[19]['PATH'] = SM_PATH . 'themes/methodical_theme.php';
+$theme[19]['NAME'] = 'Methodical';
+$theme[20]['PATH'] = SM_PATH . 'themes/greenhouse_effect.php';
+$theme[20]['NAME'] = 'Greenhouse Effect (Changes)';
+$theme[21]['PATH'] = SM_PATH . 'themes/in_the_pink.php';
+$theme[21]['NAME'] = 'In The Pink (Changes)';
+$theme[22]['PATH'] = SM_PATH . 'themes/kind_of_blue.php';
+$theme[22]['NAME'] = 'Kind of Blue (Changes)';
+$theme[23]['PATH'] = SM_PATH . 'themes/monostochastic.php';
+$theme[23]['NAME'] = 'Monostochastic (Changes)';
+$theme[24]['PATH'] = SM_PATH . 'themes/shades_of_grey.php';
+$theme[24]['NAME'] = 'Shades of Grey (Changes)';
+$theme[25]['PATH'] = SM_PATH . 'themes/spice_of_life.php';
+$theme[25]['NAME'] = 'Spice of Life (Changes)';
+$theme[26]['PATH'] = SM_PATH . 'themes/spice_of_life_lite.php';
+$theme[26]['NAME'] = 'Spice of Life - Lite (Changes)';
+$theme[27]['PATH'] = SM_PATH . 'themes/spice_of_life_dark.php';
+$theme[27]['NAME'] = 'Spice of Life - Dark (Changes)';
+$theme[28]['PATH'] = SM_PATH . 'themes/christmas.php';
+$theme[28]['NAME'] = 'Holiday - Christmas';
+$theme[29]['PATH'] = SM_PATH . 'themes/darkness.php';
+$theme[29]['NAME'] = 'Darkness (Changes)';
+$theme[30]['PATH'] = SM_PATH . 'themes/random.php';
+$theme[30]['NAME'] = 'Random (Changes every login)';
+$theme[31]['PATH'] = SM_PATH . 'themes/midnight.php';
+$theme[31]['NAME'] = 'Midnight';
+$theme[32]['PATH'] = SM_PATH . 'themes/alien_glow.php';
+$theme[32]['NAME'] = 'Alien Glow';
+$theme[33]['PATH'] = SM_PATH . 'themes/dark_green.php';
+$theme[33]['NAME'] = 'Dark Green';
+$theme[34]['PATH'] = SM_PATH . 'themes/penguin.php';
+$theme[34]['NAME'] = 'Penguin';
+
+$default_use_javascript_addr_book = false;
+$addrbook_dsn = '';
+$addrbook_table = 'address';
+
+$prefs_dsn = '';
+$prefs_table = 'userprefs';
+$prefs_user_field = 'user';
+$prefs_key_field = 'prefkey';
+$prefs_val_field = 'prefval';
+$no_list_for_subscribe = false;
+$smtp_auth_mech = 'none';
+$imap_auth_mech = 'login';
+$use_imap_tls = false;
+$use_smtp_tls = false;
+$session_name = 'SQMSESSID';
+
+@include SM_PATH . 'config/config_local.php';
+
+/**
+ * Make sure there are no characters after the PHP closing
+ * tag below (including newline characters and whitespace).
+ * Otherwise, that character will cause the headers to be
+ * sent and regular output to begin, which will majorly screw
+ * things up when we try to send more headers later.
+ */
+?>
diff --git a/contrib/RPM/squirrelmail.conf b/contrib/RPM/squirrelmail.conf
new file mode 100644 (file)
index 0000000..101119c
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# SquirrelMail is a webmail package written in PHP.
+# This is a config file for apache 2.0.
+# $Id$
+#
+
+Alias /webmail /usr/share/squirrelmail
diff --git a/contrib/RPM/squirrelmail.cron b/contrib/RPM/squirrelmail.cron
new file mode 100644 (file)
index 0000000..21c1064
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+# This goes through the squirrelmail attachment spool directory and
+# removes any abandoned temporary files that are more than 10 days old.
+# $Id$
+#
+/usr/sbin/tmpwatch 240 __ATTDIR__
diff --git a/contrib/RPM/squirrelmail.spec b/contrib/RPM/squirrelmail.spec
new file mode 100644 (file)
index 0000000..336a25e
--- /dev/null
@@ -0,0 +1,212 @@
+##
+# $Id$
+%define spec_release 1
+
+##
+# Rebuild with:
+# rpmbuild --rebuild --define 'rhl7 1' squirrelmail-1.4.x.src.rpm
+# to build for rhl7.
+
+%{!?rhl7:%define rhl7 0}
+%if %{rhl7}
+       %define webserver apache
+    %define rpm_release %{spec_release}.7.x
+%else
+       %define webserver httpd
+    %define rpm_release %{spec_release}
+%endif
+
+Summary: SquirrelMail webmail client
+Name: squirrelmail
+Version: 1.4.0
+Release: %{rpm_release}
+License: GPL
+URL: http://www.squirrelmail.org/
+Vendor: squirrelmail.org
+Group: Applications/Internet
+Source: %{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildArch: noarch
+Requires: %{webserver}, php >= 4.0.4, perl, tmpwatch >= 2.8, aspell
+Requires: /usr/sbin/sendmail
+Prereq: %{webserver}, perl
+BuildPrereq: perl
+
+%description
+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.
+
+%prep
+%setup -q
+%{__rm} -f plugins/make_archive.pl
+
+# Rearrange the documentation
+%{__mv} AUTHORS ChangeLog COPYING INSTALL README UPGRADE doc/
+%{__mv} ReleaseNotes doc/ReleaseNotes.txt
+%{__mv} themes/README.themes doc/
+for f in `find plugins -name "README*" -or -name INSTALL \
+                  -or -name CHANGES -or -name HISTORY`; do
+    %{__mkdir_p} doc/`dirname $f`
+    %{__mv} $f $_
+done
+%{__mv} doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell
+%{__rm} -rf doc/plugins/squirrelspell/doc
+%{__mv} plugins/squirrelspell/doc/* doc/plugins/squirrelspell
+%{__rm} -f doc/plugins/squirrelspell/index.php
+%{__rm} -rf plugins/squirrelspell/doc
+
+# Fixup various files
+echo "left_refresh=300" >> data/default_pref
+for f in contrib/RPM/squirrelmail.cron contrib/RPM/config.php.redhat; do
+    %{__perl} -pi \
+        -e "s|__ATTDIR__|%{_localstatedir}/spool/squirrelmail/attach/|g;" \
+           -e "s|__PREFSDIR__|%{_localstatedir}/lib/squirrelmail/prefs/|g;" $f
+done
+
+# Fix the version
+%{__perl} -pi -e "s|^(\s*\\\$version\s*=\s*).*|\1'%{version}-%{release}';|g"\
+    functions/strings.php
+
+%install
+rm -rf %{buildroot}
+%{__mkdir_p} -m 755 %{buildroot}%{_sysconfdir}/squirrelmail
+%{__mkdir_p} -m 755 %{buildroot}%{_localstatedir}/lib/squirrelmail/prefs
+%{__mkdir_p} -m 755 %{buildroot}%{_localstatedir}/spool/squirrelmail/attach
+%{__mkdir_p} -m 755 %{buildroot}%{_datadir}/squirrelmail
+
+# install default_pref
+%{__install} -m 644 data/default_pref \
+    %{buildroot}%{_localstatedir}/lib/squirrelmail/prefs/
+
+# install the config files
+%{__mkdir_p} -m 755 %{buildroot}%{_datadir}/squirrelmail/config
+%{__install} -m 644 contrib/RPM/config.php.redhat \
+    %{buildroot}%{_sysconfdir}/squirrelmail/config.php
+%{__ln_s} %{_sysconfdir}/squirrelmail/config.php \
+    %{buildroot}%{_datadir}/squirrelmail/config/config.php
+%{__install} -m 644 config/config_local.php \
+    %{buildroot}%{_sysconfdir}/squirrelmail/config_local.php
+%{__ln_s} %{_sysconfdir}/squirrelmail/config_local.php \
+    %{buildroot}%{_datadir}/squirrelmail/config/config_local.php
+%{__rm} -f config/config_local.php config/config.php
+%{__install} -m 644 config/*.php %{buildroot}%{_datadir}/squirrelmail/config/
+%{__install} -m 755 config/*.pl  %{buildroot}%{_datadir}/squirrelmail/config/
+
+# install index.php
+%{__install} -m 644 index.php %{buildroot}%{_datadir}/squirrelmail/
+
+# Copy over the rest
+for DIR in class functions help images include locale plugins src themes; do
+    %{__cp} -rp $DIR %{buildroot}%{_datadir}/squirrelmail/
+done
+
+# install the cron script
+%{__mkdir_p} -m 755 %{buildroot}%{_sysconfdir}/cron.daily
+%{__install} -m 755 contrib/RPM/squirrelmail.cron \
+    %{buildroot}/%{_sysconfdir}/cron.daily/
+
+%if %{rhl7}
+# symlink from /var/www/html/webmail to /usr/share/squirrelmail
+%{__mkdir_p} -m 755 %{buildroot}/var/www/html
+%{__ln_s} %{_datadir}/squirrelmail %{buildroot}/var/www/html/webmail
+%else
+# install the config file
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d
+%{__install} -m 644 contrib/RPM/squirrelmail.conf \
+       %{buildroot}%{_sysconfdir}/httpd/conf.d/
+%endif
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%config %dir %{_sysconfdir}/squirrelmail
+%config(noreplace) %{_sysconfdir}/squirrelmail/*
+%if %{rhl7}
+  /var/www/html/webmail
+%else
+  %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
+%endif
+%doc doc/*
+%dir %{_datadir}/squirrelmail
+%{_datadir}/squirrelmail/index.php
+%{_datadir}/squirrelmail/class
+%{_datadir}/squirrelmail/functions
+%{_datadir}/squirrelmail/help
+%{_datadir}/squirrelmail/images
+%{_datadir}/squirrelmail/include
+%{_datadir}/squirrelmail/locale
+%{_datadir}/squirrelmail/src
+%{_datadir}/squirrelmail/themes
+%{_datadir}/squirrelmail/config
+%dir %{_datadir}/squirrelmail/plugins
+%{_datadir}/squirrelmail/plugins/*
+%dir %{_localstatedir}/lib/squirrelmail
+%dir %{_localstatedir}/spool/squirrelmail
+%attr(0770, root, apache) %dir %{_localstatedir}/lib/squirrelmail/prefs
+%attr(0730, root, apache) %dir %{_localstatedir}/spool/squirrelmail/attach
+%{_localstatedir}/lib/squirrelmail/prefs/default_pref
+%{_sysconfdir}/cron.daily/squirrelmail.cron
+
+%changelog
+* Tue Mar 26 2003 Konstantin Riabitsev <icon@duke.edu> 1.4.0-1
+- Build for 1.4.0
+
+* Thu Feb 13 2003 Konstantin Riabitsev <icon@duke.edu> 1.4.0-0.2pre
+- Initial release for 1.4.0 prerelease
+
+* Tue Feb 04 2003 Konstantin Riabitsev <icon@duke.edu> 1.2.11-1
+- Upping version number.
+
+* Tue Oct 29 2002 Konstantin Riabitsev <icon@duke.edu> 1.2.9-1
+- Upping version number.
+
+* Sat Sep 14 2002 Konstantin Riabitsev <icon@duke.edu> 1.2.8-1
+- adopted RH's spec file so we don't duplicate effort. 
+- Removed rh'ized splash screen.
+- Adding fallbacks for building rhl7 version as well with the same 
+  specfile. Makes the spec file not as clean, but hey.
+- remove workarounds for #68669 (rh bugzilla), since 1.2.8 works with
+  register_globals = Off.
+- Hardwiring localhost into the default config file. Makes sense.
+- No more such file MIRRORS.
+- Adding aspell as one of the req's, since squirrelspell is enabled by
+  default
+- Added Vendor: line to distinguish ourselves from RH.
+- Doing the uglies with the release numbers.
+
+* Tue Aug  6 2002 Preston Brown <pbrown@redhat.com> 1.2.7-4
+- replacement splash screen.
+
+* Mon Jul 22 2002 Gary Benson <gbenson@redhat.com> 1.2.7-3
+- get rid of long lines in the specfile.
+- remove symlink in docroot and use an alias in conf.d instead.
+- work with register_globals off (#68669)
+
+* Tue Jul 09 2002 Gary Benson <gbenson@redhat.com> 1.2.7-2
+- hardwire the hostname (well, localhost) into the config file (#67635)
+
+* Mon Jun 24 2002 Gary Benson <gbenson@redhat.com> 1.2.7-1
+- hardwire the locations into the config file and cron file.
+- install squirrelmail-cleanup.cron as squirrelmail.cron.
+- make symlinks relative.
+- upgrade to 1.2.7.
+- more dependency fixes.
+
+* Fri Jun 21 2002 Gary Benson <gbenson@redhat.com>
+- summarize the summary, fix deps, and remove some redundant stuff.
+- tidy up the prep section.
+- replace directory definitions with standard RHL ones.
+
+* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 1.2.6-3
+- automated rebuild
+
+* Wed Jun 19 2002 Preston Brown <pbrown@redhat.com> 1.2.6-2
+- adopted Konstantin Riabitsev <icon@duke.edu>'s package for Red Hat
+  Linux.  Nice job Konstantin!