Summary: Open Webmail is a Perl-based webmail client. Name: openwebmail Version: 2.20 # do not touch the version - this comes from author Release: 1.20031104_0.9 License: GPL Group: Applications/Internet URL: http://openwebmail.org Source: http://openwebmail.com/openwebmail/download/%{name}-current.tgz Patch0: openwebmail-authunix.patch Patch1: openwebmail-conf.patch Source13: openwebmail-httpd.conf Source14: openwebmail.logrotate Source15: openwebmail-README-RedHat.rpm Source16: openwebmail-pam.conf BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-root BuildRequires: bash sed fileutils # we need this to run on system Requires: perl, perl-CGI, perl-Text-Iconv, perl-suidperl, aspell # MIME::Base64 is a part of Perl distribution since RH 8.0 so we have to # require module by name and not by package name Requires: perl(MIME::Base64) # for PAM authentication we need extra Perl module Requires: perl-Authen-PAM perl-Aspell %description Open WebMail is a webmail system based on the Neomail version 1.14 from Ernie Miller. Open WebMail is designed to manage very large mail folder files in a memory efficient way. It also provides a range of features to help users migrate smoothly from Microsoft Outlook to Open WebMail. Read the README-RedHat.rpm file under the doc directory for more info. %prep %setup -q -c -n %{name}-%{version} # patch for auth_unix %patch0 -p1 -b .orig # patch for openwebmail.conf %patch1 -p1 -b .orig install -m644 %{S:15} README-RedHat.rpm %install # this distribution only rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d install -m644 %{S:13} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m644 %{S:14} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d install -m644 %{S:16} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/%{name} # files from original tarball # destination path under $RPM_BUILD_ROOT is considerably changed # to come closer to the Filesystem Hierarchy Standard mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp -a data/openwebmail $RPM_BUILD_ROOT%{_datadir}/%{name}/data rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/data/doc cp -a cgi-bin/openwebmail $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin for D in lang styles templates; do mv $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc/$D \ $RPM_BUILD_ROOT%{_datadir}/%{name} done mkdir -p $RPM_BUILD_ROOT/var/cache mv $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc/users \ $RPM_BUILD_ROOT/var/cache/%{name} mkdir -p $RPM_BUILD_ROOT/var/run mv $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc/sessions \ $RPM_BUILD_ROOT/var/run/%{name} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} mv $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc \ $RPM_BUILD_ROOT%{_sysconfdir}/%{name} ( mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/smrsh cd $RPM_BUILD_ROOT%{_sysconfdir}/smrsh ln -s ../..%{_datadir}/%{name}/cgi-bin/vacation.pl mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc cd $RPM_BUILD_ROOT%{_datadir}/%{name}/cgi-bin/etc ln -s ../../../../..%{_sysconfdir}/%{name}/%{name}.conf.default \ %{name}.conf.default ln -s ../../../../..%{_sysconfdir}/%{name}/%{name}.conf %{name}.conf ) mkdir -p $RPM_BUILD_ROOT/var/log touch $RPM_BUILD_ROOT/var/log/%{name}.log # there is a pretty mixture of normal files and directories with special # access rights. We have to write down all this stuff to this spec file # to be correct. Adopting this information from extracted files is wrong # and may not work. So we use on-fly generated filelist. set +x # avoid the vast output BASE=$RPM_BUILD_ROOT%{_datadir}/%{name}/ { find $BASE | while read BUILDNAME; do ABSNAME=${BUILDNAME#$RPM_BUILD_ROOT} FILENAME=${BUILDNAME#$BASE} case "$FILENAME" in cgi-bin/openwebmail*.pl) echo "%attr(4755,root,mail) \"$ABSNAME\"" ;; cgi-bin/vacation.pl) echo "%attr(0755,root,root) \"$ABSNAME\"" ;; cgi-bin/uty/*.pl|cgi-bin/uty/*.sh) echo "%attr(0755,root,root) \"$ABSNAME\"" ;; lang/*|templates/*) LANGETC=${FILENAME#*/} LANG=${LANGETC%%/*} echo -n "%lang($LANG) " [ -d "$BUILDNAME" ] && echo -n "%dir " echo "\"$ABSNAME\"" ;; *) [ -d "$BUILDNAME" ] && echo -n "%dir " echo "\"$ABSNAME\"" ;; esac done BASE=$RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ find $BASE | while read BUILDNAME; do ABSNAME=${BUILDNAME#$RPM_BUILD_ROOT/} FILENAME=${BUILDNAME#$BASE} case "$FILENAME" in openwebmail.conf.*|*.map) echo "\"$ABSNAME\"" ;; *.conf|*.book) echo "%config(noreplace) \"$ABSNAME\"" ;; *) [ -d "$BUILDNAME" ] && echo -n "%dir " || echo -n "%config " echo "\"$ABSNAME\"" ;; esac done } > %{name}-%{version}-filelist set -x # and now touch the %ghost files (they will not be included in the package) for i in b2g.db etc.mail.virtusertable.db etc.mail.virtusertable.rev.db g2b.db lunar.db; do touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$i done %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT #rm -rf $RPM_BUILD_DIR/%{name}-%{version} %files -f %{name}-%{version}-filelist %defattr(-,-,-) %attr(770,root,mail) /var/run/%{name} %attr(770,root,mail) /var/cache/%{name} %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_sysconfdir}/smrsh/vacation.pl %ghost %attr(0660,root,mail) /var/log/%{name}.log %ghost %{_sysconfdir}/%{name}/*.db %doc data/openwebmail/doc README-RedHat.rpm %post # send output to std.err. echo 1>&2 echo 'Run "/usr/share/openwebmail/cgi-bin/openwebmail-tool.pl --init" first.' 1>&2 echo "Then access it via http://$HOSTNAME/openwebmail/" 1>&2 echo 1>&2 %changelog * Tue Nov 04 2003 Milan Kerslager 2.20-1.20031104_0.9 - added (noreplace) to /etc/openwebmail/*{conf,book} * Tue Oct 28 2003 Milan Kerslager 2.20-1.9.20031027 - updated to current version - added missingok,notifempty,size 50k to /etc/logrotate.d/openwebmail - patch for openwebmail.conf fixed for new defaults * Wed Oct 22 2003 Milan Kerslager 2.20-1.9.20031022 - updated to current version 2.20 (20031022) - perl-Aspell added to Requires: * Fri Oct 3 2003 Milan Kerslager 2.10-1.9.20031002 - updated to current version (20030904) - fixed .filter.book.db problem * Mon Sep 8 2003 Milan Kerslager 2.10-1.9.20030904 - updated to current version (20030904) * Mon Aug 25 2003 Milan Kerslager 2.10-1.9.20030825 - updated to 2.10 version (20030825) * Wed Jun 11 2003 Milan Kerslager 2.01-4.9.20030608 - minor change in openwebmail-httpd.conf - updated to 20030608 version * Wed May 21 2003 Milan Kerslager 2.01-2.9.20030520 - fix in openwebmail.conf (Web server config file) - %config(noreplace) and %{_sysconfdir} instead of /etc - /usr/share is %{_datadir}, /usr/share/openwebmail is %{_datadir}/%{name} - openwebmail -> %{name} (where the name of the package is expected) * Wed May 20 2003 Milan Kerslager 2.01-2.9.20030520 - to utilize zlib compression and speedup install perl-Compress-Zlib (this is a standard part of Red Hat 9 distribution) - unneeded patch removed from source package - README-RedHat.rpm updated * Wed May 20 2003 Milan Kerslager 2.01-1.9.20030520 - updated to current relase (20030520) - fixes in config files (for Web server, autodetection for language and charset + autosaverc file (to not confuse new users) - added /etc/openwebmail/*.db files to package as %ghost files * Wed May 14 2003 Milan Kerslager 2.01-1.9 - updated to 2.01 - merged with Milan Krcmar's changes in spec file - MIME-Base64 is a part of perl-5.8.0, so we need Requires(MIME::Base64) users of RH 7.3 or perl older than 5.8.0 should install perl-MIME-Base64 package separately (this package is a part of RH 7.3) - a patch for openwebmail-tool.pl to check for a little bit modified line in DB_File.pm (RH 9 perl-5.8.0-88 specific - we do not want to force a user to modify the file on the disc [from another package]) - authentication is done via PAM now (Requires: perl-Authen-PAM) * Thu Feb 27 2003 Milan Krcmar 1.90.20030226-3 - RH release number removed from package's release number: no other differences found between 7.x and 8.0 packages - OWM's snapshot date appended to its version number to distinguish daily snapshots - doc files (including the RedHat notice) are now part of the main tarball, do not include them separately anymore - allow for whitespace in filenames (one such file exists in current release) - config patch applied to both openwebmail.conf and openwebmail.conf.default * Mon Feb 10 2003 Milan Krcmar 1.81-7x.20030130.2 - improved filelist creation to use only shell-builtin commands (speedup) - attached auth_unix.pl converted to a patch not to ignore source changes in this file - attached openwebmail.conf also converted to a patch which is furthermore applied to openwebmail.conf.default instead of openwebmail.conf - more files moved to come even closer to FHS - more requirements for Perl packages added * Fri Jan 31 2003 Milan Kerslager 1.81-8x.20030130.1 - updated to 1.81, 2003-01-30 - rebuild for 8.0 - release number design changed to allow build for 7.x and 8.x * Mon Jan 13 2003 Milan Kerslager 1.81-3.20030113 - updated due to remote exploit * Tue Dec 4 2002 Milan Kerslager 1.81-2.20021127 - added requires: perl-CGI - %lang() directives added - allow to use URL http://your.server.com/openwebmail (by Rewrite rules) * Tue Dec 3 2002 Milan Kerslager 1.81-1.20021127 - minor fixes * Tue Nov 26 2002 Milan Kerslager - initial release for RH 8.0