1 1;2c# $Revision: 1.30 $, $Date: 2007-08-01 11:41:13 $
3 #define _snap 2006-01-08
7 %include /usr/lib/rpm/macros.php
8 Summary: MIMP - a stripped down version of IMP for use on mobile phones/PDAs
9 Summary(pl.UTF-8): MIMP - uproszczona wersja IMP-a do używania na telefonach przenośnych i PDA
10 Name: horde-%{_hordeapp}
12 Release: %{?_rc:0.%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
14 Group: Applications/WWW
15 #Source0: ftp://ftp.horde.org/pub/snaps/%{_snap}/%{_hordeapp}-HEAD-%{_snap}.tar.gz
16 #Source0: ftp://ftp.horde.org/pub/mimp/%{_hordeapp}-h3-%{version}-%{_rc}.tar.gz
17 Source0: ftp://ftp.horde.org/pub/mimp/%{_hordeapp}-h3-%{version}.tar.gz
18 # Source0-md5: 5fd92232cbc7008563c7200c72a7a6e7
19 Source1: %{_hordeapp}.conf
20 Patch0: %{_hordeapp}-prefs.patch
21 URL: http://www.horde.org/mimp/
22 BuildRequires: rpm-php-pearprov >= 4.0.2-98
23 BuildRequires: rpmbuild(macros) >= 1.268
24 BuildRequires: tar >= 1:1.15.1
25 Requires: horde >= 3.0
27 Obsoletes: %{_hordeapp}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # horde accesses it directly in help->about
32 %define _noautocompressdoc CREDITS
33 %define _noautoreq 'pear(Horde.*)' 'pear(Text/Flowed.php)'
35 %define hordedir /usr/share/horde
36 %define _appdir %{hordedir}/%{_hordeapp}
37 %define _webapps /etc/webapps
38 %define _webapp horde-%{_hordeapp}
39 %define _sysconfdir %{_webapps}/%{_webapp}
42 MIMP is a project to create a version of IMP suitable for mobile
43 devices such as WAP phones or PDAs. Basic functionality is now all
44 implemented, including mailbox viewing and paging, viewing messages,
45 deleting, replying, forwarding, and composing new messages.
47 The Horde Project writes web applications in PHP and releases them
48 under the GNU General Public License. For more information (including
49 help with MIMP) please visit <http://www.horde.org/>.
51 %description -l pl.UTF-8
52 MIMP to projekt mający na celu stworzenie wersji IMP-a odpowiedniej
53 dla urządzeń przenośnych, takich jak telefony WAP czy PDA. Podstawowa
54 funkcjonalność jest teraz w całości zaimplementowana, włącznie z
55 oglądaniem skrzynek pocztowych i stronicowaniem, oglądaniem
56 wiadomości, usuwaniem, odpowiadaniem, przekazywaniem i tworzeniem
59 Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
60 Genral Public License. Więcej informacji (włącznie z pomocą dla
61 MIMP-a) można znaleźć na stronie <http://www.horde.org/>.
64 %setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}}
65 tar zxf %{SOURCE0} --strip-components=1
68 for i in config/*.dist; do
69 mv $i config/$(basename $i .dist)
71 # considered harmful (horde/docs/SECURITY)
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
78 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
79 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
80 echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
81 touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
82 cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
84 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
85 ln -s %{_docdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
86 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
87 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
90 rm -rf $RPM_BUILD_ROOT
93 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
94 install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
97 %triggerin -- apache1 < 1.3.37-3, apache1-base
98 %webapp_register apache %{_webapp}
100 %triggerun -- apache1 < 1.3.37-3, apache1-base
101 %webapp_unregister apache %{_webapp}
103 %triggerin -- apache < 2.2.0, apache-base
104 %webapp_register httpd %{_webapp}
106 %triggerun -- apache < 2.2.0, apache-base
107 %webapp_unregister httpd %{_webapp}
109 %triggerpostun -- horde-%{_hordeapp} < 0.1-0.20051116.0.3, %{_hordeapp}
110 for i in conf.php filter.txt header.txt menu.php mime_drivers.php motd.php prefs.php servers.php trailer.txt; do
111 if [ -f /etc/horde.org/%{_hordeapp}/$i.rpmsave ]; then
112 mv -f %{_sysconfdir}/$i{,.rpmnew}
113 mv -f /etc/horde.org/%{_hordeapp}/$i.rpmsave %{_sysconfdir}/$i
117 if [ -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave ]; then
118 mv -f %{_sysconfdir}/apache.conf{,.rpmnew}
119 mv -f %{_sysconfdir}/httpd.conf{,.rpmnew}
120 cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/apache.conf
121 cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/httpd.conf
124 if [ -L /etc/apache/conf.d/99_horde-%{_hordeapp}.conf ]; then
125 /usr/sbin/webapp register apache %{_webapp}
126 rm -f /etc/apache/conf.d/99_horde-%{_hordeapp}.conf
127 %service -q apache reload
129 if [ -L /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf ]; then
130 /usr/sbin/webapp register httpd %{_webapp}
131 rm -f /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf
132 %service -q httpd reload
136 %defattr(644,root,root,755)
138 %dir %attr(750,root,http) %{_sysconfdir}
139 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
140 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
141 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
142 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
143 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
144 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/*.txt
145 %attr(640,root,http) %{_sysconfdir}/conf.xml