3 Summary: Hastymail - easy-to-use, fast webmail system
4 Summary(pl.UTF-8): Hastymail - łatwy w użyciu, szybki system webmail
9 Group: Applications/Mail
10 Source0: http://dl.sourceforge.net/hastymail/%{name}-%{version}.tar.bz2
11 # Source0-md5: bbff61a6986356ec235cf2310a08d811
12 Source1: %{name}.htaccess
13 URL: http://hastymail.sourceforge.net/
14 Requires(post): fileutils
15 Requires(post): sed >= 4.0
16 Requires(post): textutils
17 Requires: php(gettext)
21 Requires: webserver(php)
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _hastymaildir /home/services/httpd/html/%{name}
26 %define vardir /var/lib/%{name}
29 Hastymail is yet another webmail IMAP client written in PHP. It's
30 designed for speed, RFC compatibility and security. Hastymail is
31 intended to be the fastest PHP IMAP client around.
33 %description -l pl.UTF-8
34 Hastymail to jeszcze jeden webmailowy klient IMAP napisany w PHP.
35 Został zaprojektowany z myślą o szybkości, kompatybilności z RFC i
36 bezpieczeństwie. Hastymail ma być najszybszym istniejącym klientem
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_hastymaildir},%{_sysconfdir}/httpd/httpd.conf} \
45 $RPM_BUILD_ROOT%{vardir}/{settings/attachments,include}
47 cp -a {filter,html,idna,images,index.php,lang,lib,templates,themes} $RPM_BUILD_ROOT%{_hastymaildir}
49 install %{SOURCE1} $RPM_BUILD_ROOT%{_hastymaildir}/.htaccess
50 sed -e "s@/var/hastymail@%{vardir}@" hastymail.conf-example > \
51 $RPM_BUILD_ROOT%{_sysconfdir}/hastymail.conf
54 rm -rf $RPM_BUILD_ROOT
58 SECRET=`dd if=/dev/urandom bs=1 count=42 2>/dev/null | od -a -w42 | cut -c8- | sed -e 's![^[:alnum:]]!!g' | xargs`
59 if [ -n "$SECRET" ] ; then
60 echo "Updating authentication secret in config files..."
61 sed -i -e 's#\"KEY\"#\"$SECRET\"#g' %{_hastymaildir}/.htaccess
63 echo "Remember to update secret in "
64 echo " %{_hastymaildir}/.htaccess"
67 %service -q httpd restart
70 %defattr(644,root,root,755)
71 %doc INSTALL CHANGES TODO README DEVELOPMENT RELEASE.NOTES hastymail.conf-example
73 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
75 %dir %attr(700,http,http) %{vardir}/settings
76 %dir %attr(700,http,http) %{vardir}/settings/attachments
77 %{_hastymaildir}/filter
80 %{_hastymaildir}/images
81 %{_hastymaildir}/index.php
84 %{_hastymaildir}/templates
85 %{_hastymaildir}/themes
86 %config(noreplace) %verify(not md5 mtime size) %{_hastymaildir}/.htaccess