AutoReq: 0 Summary: SquirrelMail webmail client Name: squirrelmail Version: 1.4.4 Release: 3 License: GPL URL: http://www.squirrelmail.org/ Vendor: squirrelmail.org Group: Applications/Internet Source: %{name}-%{version}.tar.bz2 Source1: sasql-3.1.1.tar.gz Source2: spamassassin.sql Patch0: squirrelmail.patch Patch1: sasql.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch Requires: httpd, php >= 4.0.4, perl, tmpwatch >= 2.8, aspell Requires: /bin/ln Requires: psa spamassassin php-mysql %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 -a 1 %patch0 %{__mv} sasql plugins/ %patch1 %{__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 config/config_local.php; 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 777 %{buildroot}%{_localstatedir}/spool/squirrelmail/attach %{__mkdir_p} -m 777 %{buildroot}%{_datadir}/squirrelmail/data %{__mkdir_p} -m 777 %{buildroot}%{_sysconfdir}/squirrelmail/prefs/data # install default_pref %{__install} -m 777 data/default_pref \ %{buildroot}%{_localstatedir}/lib/squirrelmail/prefs/ %{__install} -m 777 data/default_pref \ %{buildroot}%{_datadir}/squirrelmail/data/ #%{__mkdir_p} -m 755 %{buildroot}%{_datadir}/squirrelmail/data #%{__ln_s} %{buildroot}%{_localstatedir}/lib/squirrelmail/prefs/default_pref %{buildroot}%{_datadir}/squirrelmail/data/default_pref # 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 the sql %{__install} -m 644 %{SOURCE2} %{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 %{__mv} %{buildroot}%{_datadir}/squirrelmail/plugins/sasql/sasql_conf.php.dist %{buildroot}%{_datadir}/squirrelmail/plugins/sasql/sasql_conf.php # 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} #------------------------------------------------------------------------------ %pre # generate the /etc/mail/spamassassin/local.cf if [ -f /etc/mail/spamassassin/local.cf ]; then cp /etc/mail/spamassassin/local.cf /etc/mail/spamassassin/local.cf.backed_up_by_art fi PASSWD=`awk '{print $1}' /etc/psa/.webmail.shadow` echo "user_scores_dsn DBI:mysql:horde:localhost" > /etc/mail/spamassassin/local.cf echo "user_scores_sql_username horde" >> /etc/mail/spamassassin/local.cf echo "user_scores_sql_table userpref" >> /etc/mail/spamassassin/local.cf echo "user_scores_sql_password $PASSWD" >> /etc/mail/spamassassin/local.cf # update the /etc/sysconfig/spamassassin file if [ -f /etc/sysconfig/spamassassin ]; then cp /etc/sysconfig/spamassassin /etc/sysconfig/spamassassin.backed_up_by_art fi echo "SPAMDOPTIONS=\"-d -u qmailq -q -x -c -a -m30\"" > /etc/sysconfig/spamassassin %post # install the database mysql -u admin -p`cat /etc/psa/.psa.shadow` < /usr/share/squirrelmail/config/spamassassin.sql %postun if [ -f /etc/mail/spamassassin/local.cf.backed_up_by_art ]; then mv /etc/mail/spamassassin/local.cf.backed_up_by_art /etc/mail/spamassassin/local.cf fi if [ -f /etc/sysconfig/spamassassin.backed_up_by_art ]; then mv /etc/sysconfig/spamassassin.backed_up_by_art /etc/sysconfig/spamassassin fi %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/data %{_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(0770, root, apache) %dir %{_localstatedir}/spool/squirrelmail/attach %{_localstatedir}/lib/squirrelmail/prefs/default_pref #%{_datadir}/squirrelmail/data/default_pref %{_sysconfdir}/cron.daily/squirrelmail.cron #------------------------------------------------------------------------------ %changelog * Fri Apr 08 2005 Scott R. Shinn 1.4.4 - update to 1.4.4 - update sasql to 3.1.2-rc1 * Sat Nov 01 2003 Scott R. Shinn 1.4.2-art.rh9.1 - added in sasql plugin - added in spamassassin.sql - patched to pull passwds from the existing psa dir for autoconfiguration * Wed Oct 01 2003 Konstantin Riabitsev 1.4.2-1 - The release was uncoordinated with the admin team, so this revision is not in the CVS, and the RPM cannot be built from the distribution tarball. Parties responsible will be chastised. - Version 1.4.2. * Thu Jul 03 2003 Konstantin Riabitsev 1.4.1-1 - Build for 1.4.1 - Prefixing the release with "0" so the RPM upgrades cleanly when going to rhl > 7.x. * 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!