]>
Commit | Line | Data |
---|---|---|
03d20ebd ER |
1 | # TODO |
2 | # - lighttpd support | |
3 | # - make it use system Kronolith, Turba, Nag and Mnemo. | |
4 | # - system PEAR packages | |
5 | # instead of the bundled ones. | |
6 | %define _hordeapp webmail | |
7 | #define _snap 2005-08-01 | |
8 | #define _rc rc2 | |
9 | %define _rel 0.1 | |
10 | %include /usr/lib/rpm/macros.php | |
11 | Summary: Browser based collaboration suite | |
1bb2f7bf | 12 | Summary(pl.UTF-8): Oparte na przeglądarce narzędzie do pracy grupowej |
03d20ebd ER |
13 | Name: horde-%{_hordeapp} |
14 | Version: 1.0 | |
15 | Release: %{?_rc:0.%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel} | |
16 | License: GPL v2 | |
17 | Group: Applications/WWW | |
18 | Source0: ftp://ftp.horde.org/pub/horde-groupware/horde-groupware-%{version}.tar.gz | |
19 | # Source0-md5: - | |
20 | #Source1: %{name}.conf | |
21 | #Patch0: %{name}-prefs.patch | |
22 | URL: http://horde.org/groupware/ | |
23 | BuildRequires: rpm-php-pearprov >= 4.0.2-98 | |
24 | BuildRequires: rpmbuild(macros) >= 1.264 | |
25 | BuildRequires: tar >= 1:1.15.1 | |
26 | Requires: apache(mod_access) | |
27 | #Requires: horde >= 3.0 | |
28 | Requires: webapps | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | # horde accesses it directly in help->about | |
33 | %define _noautocompressdoc CREDITS | |
34 | %define _noautoreq 'pear(Horde.*)' | |
35 | ||
36 | %define hordedir /usr/share/horde | |
37 | %define _appdir %{hordedir}/%{_hordeapp} | |
38 | %define _webapps /etc/webapps | |
39 | %define _webapp horde-%{_hordeapp} | |
40 | %define _sysconfdir %{_webapps}/%{_webapp} | |
41 | ||
42 | %description | |
43 | Horde Groupware is a free, enterprise ready, browser based | |
44 | collaboration suite. Users can manage and share calendars, contacts, | |
45 | tasks and notes with the standards compliant components from the Horde | |
46 | Project. | |
47 | ||
48 | Horde Groupware bundles the separately available applications | |
49 | Kronolith, Turba, Nag and Mnemo. | |
50 | ||
51 | The Horde Project writes web applications in PHP and releases them | |
52 | under the GNU Public License. For more information (including help | |
53 | with Webmail) please visit <http://www.horde.org/>. | |
54 | ||
67484839 JR |
55 | %description -l pl.UTF-8 |
56 | Horde Groupware Webmail Edition to darmowe, gotowe do zastosowań | |
57 | produkcyjnych narzędzie do pracy grupowej. Użytkownicy mogą zarządzać | |
58 | i współdzielić kalendarze, kontakty, zadania i notatki przy użyciu | |
59 | zgodnych ze standardem komponentów z projektu Horde. | |
03d20ebd | 60 | |
67484839 | 61 | Horde Groupware jest opakowaniem aplikacji dostępnych samodzielnie: |
f759bab0 JB |
62 | Kronolith, Turba, Nag i Mnemo. |
63 | ||
03d20ebd | 64 | Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU |
67484839 JR |
65 | General Public License. Więcej informacji (włącznie z pomocą dla |
66 | Webmail) można znaleźć na stronie <http://www.horde.org/>. | |
03d20ebd ER |
67 | |
68 | %prep | |
69 | %setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}} | |
70 | tar zxf %{SOURCE0} --strip-components=1 | |
71 | ||
72 | rm -f {,*/}.htaccess | |
73 | for i in config/*.dist; do | |
74 | mv $i config/$(basename $i .dist) | |
75 | done | |
76 | # considered harmful (horde/docs/SECURITY) | |
77 | rm test.php | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs} | |
82 | ||
83 | cp -a *.php $RPM_BUILD_ROOT%{_appdir} | |
84 | cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir} | |
85 | echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php | |
86 | touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak | |
87 | cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir} | |
88 | ||
89 | ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config | |
90 | ln -s %{_docdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs | |
91 | %if 0 | |
92 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
93 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
94 | %endif | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %post | |
100 | if [ ! -f %{_sysconfdir}/conf.php.bak ]; then | |
101 | install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak | |
102 | fi | |
103 | ||
104 | %if 0 | |
105 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
106 | %webapp_register apache %{_webapp} | |
107 | ||
108 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
109 | %webapp_unregister apache %{_webapp} | |
110 | ||
111 | %triggerin -- apache < 2.2.0, apache-base | |
112 | %webapp_register httpd %{_webapp} | |
113 | ||
114 | %triggerun -- apache < 2.2.0, apache-base | |
115 | %webapp_unregister httpd %{_webapp} | |
116 | %endif | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
120 | %doc README docs/* scripts | |
121 | %dir %attr(750,root,http) %{_sysconfdir} | |
122 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
123 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
124 | %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php | |
125 | %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak | |
126 | %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php | |
127 | %attr(640,root,http) %{_sysconfdir}/conf.xml | |
128 | ||
129 | %dir %{_appdir} | |
130 | %{_appdir}/*.php | |
131 | %{_appdir}/config | |
132 | %{_appdir}/docs | |
133 | %{_appdir}/lib | |
134 | %{_appdir}/locale | |
135 | %{_appdir}/templates | |
136 | %{_appdir}/themes |