# # Spec file for Open Webmail # Summary: Open Webmail 1.81, Perl-based webmail client Name: openwebmail Version: 1.81 Release: 7x.20030130.1 License: GPL Group: Applications/Internet URL: http://openwebmail.org Source: ftp://ftp.openwebmail.org/pub/openwebmail-current.tgz Source1: openwebmail-doc.tgz Source11: auth_unix.pl Source12: openwebmail.conf Source13: openwebmail-httpd.conf Source14: openwebmail.logrotate Source15: openwebmail-README-RedHat.rpm BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-root BuildRequires: sed fileutils #Distribution: Open Webmail Project #Vendor: Open Webmail Project Packager: Milan Kerslager Requires: perl, perl-CGI, perl-Text-Iconv, perl-suidperl, 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} %setup -q -T -D -a1 -c -n %{name}-%{version} install -m644 %{S:11} cgi-bin/openwebmail/auth_unix.pl install -m644 %{S:12} cgi-bin/openwebmail/etc/openwebmail.conf install -m644 %{S:15} README-RedHat.rpm %install # we have to install all needed files to $RPM_BUILD_ROOT directory and # not to live filesystem. This allow to build RPM package as non-root # and allow proper checking by RPM # config files first rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d install -m644 %{S:13} $RPM_BUILD_ROOT/etc/httpd/conf.d/openwebmail.conf mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d install -m644 %{S:14} $RPM_BUILD_ROOT/etc/logrotate.d/openwebmail # and now core files (with simplified structure: # /usr/share/openwebmail/data (was: # /usr/share/openwebmail/cgi-bin (was: mkdir -p $RPM_BUILD_ROOT/usr/share/openwebmail cp -a data/openwebmail $RPM_BUILD_ROOT/usr/share/openwebmail/data cp -a cgi-bin/openwebmail $RPM_BUILD_ROOT/usr/share/openwebmail/cgi-bin ( mkdir -p $RPM_BUILD_ROOT/etc/smrsh cd $RPM_BUILD_ROOT/etc/smrsh ln -s ../../usr/share/openwebmail/cgi-bin/vacation.pl ) mkdir -p $RPM_BUILD_ROOT/var/log/openwebmail.log touch /var/log/openwebmail.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. BASE=/usr/share/openwebmail/cgi-bin for i in $(find $RPM_BUILD_ROOT$BASE); do LINE=$(echo $i | sed "s@^$RPM_BUILD_ROOT@@") FILENAME=$(echo $i | sed "s@^$RPM_BUILD_ROOT$BASE/@@") { case $FILENAME in openwebmail.pl|openwebmail-*) echo "%attr(4755,root,mail) $LINE" ;; vacation.pl) echo "%attr(0755,root,root) $LINE" ;; etc) echo "%dir %attr(755,root,mail) $LINE" ;; etc/sessions|etc/users) echo "%attr(770,root,mail) $LINE" ;; etc/openwebmail.conf) echo "%config $LINE" ;; etc/lang/*) LANG=$(echo $FILENAME | sed s@etc/lang/@@) echo "%lang($LANG) $LINE" ;; etc/templates/*) LANG=$(echo $FILENAME | sed -e s@etc/templates/@@ -e 's@/.*$@@') echo -n "%lang($LANG) " [ -d $i ] && echo -n "%dir " echo "$LINE" ;; *) [ -d $i ] && echo -n "%dir " echo "$LINE" ;; esac } >> openwebmail-%{version}-filelist done %files -f openwebmail-%{version}-filelist %defattr(-,-,-) %doc doc/copyright.txt README-RedHat.rpm %config /etc/httpd/conf.d/openwebmail.conf %config /etc/logrotate.d/openwebmail /usr/share/openwebmail/data /etc/smrsh/vacation.pl %ghost %attr(0660,root,mail) /var/log/openwebmail.log %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 * Fri Jan 31 2003 Milan Kerslager 1.81-7x.20030130.1 - updated to 1.81, 2003-01-30 - rebuild for 7.3 - 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