]> git.pld-linux.org Git - packages/horde-mimp.git/blame - horde-mimp.spec
- removed bogus chars
[packages/horde-mimp.git] / horde-mimp.spec
CommitLineData
2f7e517d 1%define _hordeapp mimp
a2202971 2#define _snap 2006-01-08
421a2d32 3#define _rc beta
03430399 4%define _rel 3
2f7e517d 5#
397a8d0b 6%include /usr/lib/rpm/macros.php
4a868dbd 7Summary: MIMP - a stripped down version of IMP for use on mobile phones/PDAs
f867a65d 8Summary(pl.UTF-8): MIMP - uproszczona wersja IMP-a do używania na telefonach przenośnych i PDA
4721cbc6 9Name: horde-%{_hordeapp}
a2202971 10Version: 1.0
2f7e517d 11Release: %{?_rc:0.%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
397a8d0b
ER
12License: GPL
13Group: Applications/WWW
a2202971 14#Source0: ftp://ftp.horde.org/pub/snaps/%{_snap}/%{_hordeapp}-HEAD-%{_snap}.tar.gz
421a2d32
SP
15#Source0: ftp://ftp.horde.org/pub/mimp/%{_hordeapp}-h3-%{version}-%{_rc}.tar.gz
16Source0: ftp://ftp.horde.org/pub/mimp/%{_hordeapp}-h3-%{version}.tar.gz
17# Source0-md5: 5fd92232cbc7008563c7200c72a7a6e7
2f7e517d
ER
18Source1: %{_hordeapp}.conf
19Patch0: %{_hordeapp}-prefs.patch
397a8d0b 20URL: http://www.horde.org/mimp/
2f7e517d 21BuildRequires: rpm-php-pearprov >= 4.0.2-98
21a9ed28 22BuildRequires: rpmbuild(macros) >= 1.268
2f7e517d 23BuildRequires: tar >= 1:1.15.1
397a8d0b 24Requires: horde >= 3.0
dce301be 25Requires: webapps
4721cbc6 26Obsoletes: %{_hordeapp}
397a8d0b
ER
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30# horde accesses it directly in help->about
31%define _noautocompressdoc CREDITS
2f7e517d 32%define _noautoreq 'pear(Horde.*)' 'pear(Text/Flowed.php)'
397a8d0b
ER
33
34%define hordedir /usr/share/horde
faff795b 35%define _appdir %{hordedir}/%{_hordeapp}
dce301be
ER
36%define _webapps /etc/webapps
37%define _webapp horde-%{_hordeapp}
38%define _sysconfdir %{_webapps}/%{_webapp}
397a8d0b
ER
39
40%description
41MIMP is a project to create a version of IMP suitable for mobile
42devices such as WAP phones or PDAs. Basic functionality is now all
43implemented, including mailbox viewing and paging, viewing messages,
44deleting, replying, forwarding, and composing new messages.
45
46The Horde Project writes web applications in PHP and releases them
47under the GNU General Public License. For more information (including
48help with MIMP) please visit <http://www.horde.org/>.
49
dca2e4eb
JR
50%description -l pl.UTF-8
51MIMP to projekt mający na celu stworzenie wersji IMP-a odpowiedniej
52dla urządzeń przenośnych, takich jak telefony WAP czy PDA. Podstawowa
53funkcjonalność jest teraz w całości zaimplementowana, włącznie z
54oglądaniem skrzynek pocztowych i stronicowaniem, oglądaniem
55wiadomości, usuwaniem, odpowiadaniem, przekazywaniem i tworzeniem
56nowych wiadomości.
4a868dbd
JB
57
58Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
dca2e4eb
JR
59Genral Public License. Więcej informacji (włącznie z pomocą dla
60MIMP-a) można znaleźć na stronie <http://www.horde.org/>.
4a868dbd 61
397a8d0b 62%prep
9231fc5b 63%setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}}
2f7e517d 64tar zxf %{SOURCE0} --strip-components=1
ffaf5dd8
ER
65%patch0 -p1
66
3bfdf5a2
ER
67for i in config/*.dist; do
68 mv $i config/$(basename $i .dist)
69done
70# considered harmful (horde/docs/SECURITY)
2dfb4209 71rm test.php
397a8d0b
ER
72
73%install
74rm -rf $RPM_BUILD_ROOT
3bfdf5a2 75install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
397a8d0b 76
3bfdf5a2
ER
77cp -a *.php $RPM_BUILD_ROOT%{_appdir}
78cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
79echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
80touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
81cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
397a8d0b 82
dce301be 83ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
2f7e517d 84ln -s %{_docdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
a2202971 85install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
a273ff98 86install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
397a8d0b
ER
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
2f7e517d 91%post
dce301be
ER
92if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
93 install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
2f7e517d
ER
94fi
95
584e790b 96%triggerin -- apache1 < 1.3.37-3, apache1-base
dce301be 97%webapp_register apache %{_webapp}
0282cc07 98
584e790b 99%triggerun -- apache1 < 1.3.37-3, apache1-base
dce301be 100%webapp_unregister apache %{_webapp}
0282cc07 101
f28e7e24 102%triggerin -- apache < 2.2.0, apache-base
dce301be 103%webapp_register httpd %{_webapp}
0282cc07 104
f28e7e24 105%triggerun -- apache < 2.2.0, apache-base
dce301be
ER
106%webapp_unregister httpd %{_webapp}
107
21a9ed28 108%triggerpostun -- horde-%{_hordeapp} < 0.1-0.20051116.0.3, %{_hordeapp}
4b113f12 109for i in conf.php filter.txt header.txt menu.php mime_drivers.php motd.php prefs.php servers.php trailer.txt; do
dce301be
ER
110 if [ -f /etc/horde.org/%{_hordeapp}/$i.rpmsave ]; then
111 mv -f %{_sysconfdir}/$i{,.rpmnew}
112 mv -f /etc/horde.org/%{_hordeapp}/$i.rpmsave %{_sysconfdir}/$i
113 fi
114done
115
116if [ -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave ]; then
117 mv -f %{_sysconfdir}/apache.conf{,.rpmnew}
118 mv -f %{_sysconfdir}/httpd.conf{,.rpmnew}
119 cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/apache.conf
120 cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/httpd.conf
121fi
122
123if [ -L /etc/apache/conf.d/99_horde-%{_hordeapp}.conf ]; then
124 /usr/sbin/webapp register apache %{_webapp}
125 rm -f /etc/apache/conf.d/99_horde-%{_hordeapp}.conf
21a9ed28 126 %service -q apache reload
dce301be
ER
127fi
128if [ -L /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf ]; then
129 /usr/sbin/webapp register httpd %{_webapp}
130 rm -f /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf
21a9ed28 131 %service -q httpd reload
dce301be 132fi
0282cc07 133
397a8d0b
ER
134%files
135%defattr(644,root,root,755)
136%doc README docs/*
9231fc5b 137%dir %attr(750,root,http) %{_sysconfdir}
fb3bd158
ER
138%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
139%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
dce301be
ER
140%attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
141%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
142%attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
143%attr(640,root,http) %config(noreplace) %{_sysconfdir}/*.txt
144%attr(640,root,http) %{_sysconfdir}/conf.xml
397a8d0b
ER
145
146%dir %{_appdir}
147%{_appdir}/*.php
148%{_appdir}/config
149%{_appdir}/docs
150%{_appdir}/lib
151%{_appdir}/locale
152%{_appdir}/templates
153%{_appdir}/themes
This page took 0.265693 seconds and 4 git commands to generate.