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