3 # - test lighttpd config
5 Summary(pl.UTF-8): Serwer CalDAV
11 Source0: http://debian.mcmillan.net.nz/packages/davical/%{name}-%{version}.tar.gz
12 # Source0-md5: 340ab213a6303742c66a8028989c2027
14 Source2: %{name}-lighttpd.conf
15 URL: http://davical.org/
16 Patch0: %{name}-php_data_dir.patch
17 Patch1: %{name}-conf_path.patch
18 Patch2: awl_version.patch
19 BuildRequires: gettext-tools
20 BuildRequires: php-awl >= 0.49
21 BuildRequires: php-pear-PhpDocumentor
22 Requires: perl(DBD::Pg)
25 Requires: php-awl >= 0.48
27 Requires: php-pdo-pgsql
30 Requires: webserver(access)
31 Requires: webserver(alias)
32 Requires: webserver(php)
33 Suggests: webserver(indexfile)
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _appdir %{_datadir}/%{name}
38 %define _webapps /etc/webapps
41 The DAViCal CalDAV Server is a repository for calendar, todo and
42 journal entries to be accessed via CalDAV clients such as Evolution,
43 Sunbird, Lightning, Mulberry, Chandler, Apple iCal or the iPhone.
51 sed -i 's#^AWL_LOCATION="\.\./awl"$#AWL_LOCATION=%{php_data_dir}/awl#' scripts/po/rebuild-translations.sh
52 sed -i /^================================================================/q COPYING
55 # we can force awl_version if required
56 # AWL_VERSION="0.50" scripts/build-always.sh < inc/always.php.in > htdocs/always.php
57 scripts/build-always.sh < inc/always.php.in > htdocs/always.php
58 phpdoc -c docs/api/phpdoc.ini
59 scripts/po/rebuild-translations.sh
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_webapps}/%{name}
64 install -d $RPM_BUILD_ROOT%{_appdir}
66 cp -a config/example-config.php $RPM_BUILD_ROOT%{_webapps}/%{name}/config.php
67 cp -a config/example-administration.yml $RPM_BUILD_ROOT%{_webapps}/%{name}/administration.yml
68 cp -a inc $RPM_BUILD_ROOT%{_appdir}
69 cp -a htdocs $RPM_BUILD_ROOT%{_appdir}
70 cp -a dba $RPM_BUILD_ROOT%{_appdir}
72 rm -rf $RPM_BUILD_ROOT%{_appdir}/dba/windows
73 rm -f $RPM_BUILD_ROOT%{_appdir}/inc/always.php.in*
75 install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/httpd.conf
76 install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/apache.conf
77 install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{name}/lighttpd.conf
79 cp -a locale $RPM_BUILD_ROOT%{_datadir}
83 rm -rf $RPM_BUILD_ROOT
85 %triggerin -- apache1 < 1.3.37-3, apache1-base
86 %webapp_register apache %{name}
88 %triggerun -- apache1 < 1.3.37-3, apache1-base
89 %webapp_unregister apache %{name}
91 %triggerin -- apache < 2.2.0, apache-base
92 %webapp_register httpd %{name}
94 %triggerun -- apache < 2.2.0, apache-base
95 %webapp_unregister httpd %{name}
97 %triggerin -- lighttpd
98 %webapp_register lighttpd %{name}
100 %triggerun -- lighttpd
101 %webapp_unregister lighttpd %{name}
103 %files -f %{name}.lang
104 %defattr(644,root,root,755)
105 %doc COPYING ChangeLog CREDITS README TODO scripts/*.php
106 %dir %attr(750,root,http) %{_sysconfdir}/webapps/%{name}
107 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/config.php
108 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/administration.yml
109 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/apache.conf
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/httpd.conf
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/lighttpd.conf
116 %{_appdir}/dba/patches
118 %attr(755,root,root) %{_appdir}/dba/create-database.sh
119 %attr(755,root,root) %{_appdir}/dba/update-davical-database