]> git.pld-linux.org Git - SPECS.git/blob - hastymail.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.git] / hastymail.spec
1 # TODO
2 # - use webapps
3 Summary:        Hastymail - easy-to-use, fast webmail system
4 Summary(pl.UTF-8):      Hastymail - łatwy w użyciu, szybki system webmail
5 Name:           hastymail
6 Version:        1.5
7 Release:        1
8 License:        GPL
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)
18 Requires:       php(pcre)
19 Requires:       php(xml)
20 Requires:       webserver
21 Requires:       webserver(php)
22 Provides:       webmail
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _hastymaildir   /home/services/httpd/html/%{name}
26 %define         vardir          /var/lib/%{name}
27
28 %description
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.
32
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
37 IMAP w PHP.
38
39 %prep
40 %setup -q
41
42 %install
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}
46
47 cp -a {filter,html,idna,images,index.php,lang,lib,templates,themes} $RPM_BUILD_ROOT%{_hastymaildir}
48
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
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 if [ "$1" = 0 ]; then
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
62         else
63                 echo "Remember to update secret in "
64                 echo "    %{_hastymaildir}/.htaccess"
65         fi
66 fi
67 %service -q httpd restart
68
69 %files
70 %defattr(644,root,root,755)
71 %doc INSTALL CHANGES TODO README DEVELOPMENT RELEASE.NOTES hastymail.conf-example
72 %dir %{_hastymaildir}
73 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
74 %dir %{vardir}
75 %dir %attr(700,http,http) %{vardir}/settings
76 %dir %attr(700,http,http) %{vardir}/settings/attachments
77 %{_hastymaildir}/filter
78 %{_hastymaildir}/html
79 %{_hastymaildir}/idna
80 %{_hastymaildir}/images
81 %{_hastymaildir}/index.php
82 %{_hastymaildir}/lang
83 %{_hastymaildir}/lib
84 %{_hastymaildir}/templates
85 %{_hastymaildir}/themes
86 %config(noreplace) %verify(not md5 mtime size) %{_hastymaildir}/.htaccess
This page took 1.131587 seconds and 3 git commands to generate.