From 8a9d8ee910a6031371fd90341de360d42650ff97 Mon Sep 17 00:00:00 2001 From: graf25 Date: Thu, 27 Mar 2003 03:08:16 +0000 Subject: [PATCH] Adding RPM-related files. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4686 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- contrib/RPM/config.php.redhat | 177 ++++++++++++++++++++++++++++ contrib/RPM/squirrelmail.conf | 7 ++ contrib/RPM/squirrelmail.cron | 6 + contrib/RPM/squirrelmail.spec | 212 ++++++++++++++++++++++++++++++++++ 4 files changed, 402 insertions(+) create mode 100644 contrib/RPM/config.php.redhat create mode 100644 contrib/RPM/squirrelmail.conf create mode 100644 contrib/RPM/squirrelmail.cron create mode 100644 contrib/RPM/squirrelmail.spec diff --git a/contrib/RPM/config.php.redhat b/contrib/RPM/config.php.redhat new file mode 100644 index 00000000..d646dc71 --- /dev/null +++ b/contrib/RPM/config.php.redhat @@ -0,0 +1,177 @@ + diff --git a/contrib/RPM/squirrelmail.conf b/contrib/RPM/squirrelmail.conf new file mode 100644 index 00000000..101119c8 --- /dev/null +++ b/contrib/RPM/squirrelmail.conf @@ -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 index 00000000..21c10645 --- /dev/null +++ b/contrib/RPM/squirrelmail.cron @@ -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 index 00000000..336a25e8 --- /dev/null +++ b/contrib/RPM/squirrelmail.spec @@ -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 1.4.0-1 +- Build for 1.4.0 + +* Thu Feb 13 2003 Konstantin Riabitsev 1.4.0-0.2pre +- Initial release for 1.4.0 prerelease + +* Tue Feb 04 2003 Konstantin Riabitsev 1.2.11-1 +- Upping version number. + +* Tue Oct 29 2002 Konstantin Riabitsev 1.2.9-1 +- Upping version number. + +* Sat Sep 14 2002 Konstantin Riabitsev 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 1.2.7-4 +- replacement splash screen. + +* Mon Jul 22 2002 Gary Benson 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 1.2.7-2 +- hardwire the hostname (well, localhost) into the config file (#67635) + +* Mon Jun 24 2002 Gary Benson 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 +- 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 1.2.6-3 +- automated rebuild + +* Wed Jun 19 2002 Preston Brown 1.2.6-2 +- adopted Konstantin Riabitsev 's package for Red Hat + Linux. Nice job Konstantin! -- 2.25.1