]>
Commit | Line | Data |
---|---|---|
d99462c6 | 1 | # TODO: |
2 | # - package docs? | |
3 | # - test lighttpd config | |
8b717ae2 | 4 | Summary: CalDAV Server |
5 | Summary(pl.UTF-8): Serwer CalDAV | |
d99462c6 | 6 | Name: davical |
78f00bed | 7 | Version: 0.9.9.6 |
915bb6fd | 8 | Release: 0.5 |
d99462c6 | 9 | License: GPL v2 |
10 | Group: Applications | |
0fa018d3 | 11 | Source0: http://debian.mcmillan.net.nz/packages/davical/%{name}-%{version}.tar.gz |
78f00bed | 12 | # Source0-md5: bf1189064e43a061c3eaaebf4416fd8b |
d99462c6 | 13 | Source1: %{name}.conf |
14 | Source2: %{name}-lighttpd.conf | |
0fa018d3 | 15 | URL: http://davical.org/ |
54a75c0e | 16 | Patch0: %{name}-php_data_dir.patch |
915bb6fd | 17 | Patch1: %{name}-conf_path.patch |
78f00bed | 18 | BuildRequires: gettext-devel |
19 | BuildRequires: php-awl >= 0.48 | |
d99462c6 | 20 | BuildRequires: php-pear-PhpDocumentor |
cb7286e7 | 21 | Requires: perl(DBD::Pg) |
22 | Requires: perl(YAML) | |
23 | Requires: perl-base | |
a06e12ac | 24 | Requires: php-awl >= 0.48 |
915bb6fd | 25 | Requires: php-pcre |
26 | Requires: php-pdo-pgsql | |
d99462c6 | 27 | Requires: php-session |
28 | Requires: webapps | |
29 | Requires: webserver(access) | |
30 | Requires: webserver(alias) | |
e5afb108 | 31 | Requires: webserver(php) |
d99462c6 | 32 | Suggests: webserver(indexfile) |
d99462c6 | 33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %define _appdir %{_datadir}/%{name} | |
37 | %define _webapps /etc/webapps | |
38 | ||
39 | %description | |
888f9340 | 40 | The DAViCal CalDAV Server is a repository for calendar, todo and |
41 | journal entries to be accessed via CalDAV clients such as Evolution, | |
42 | Sunbird, Lightning, Mulberry, Chandler, Apple iCal or the iPhone. | |
d99462c6 | 43 | |
44 | %prep | |
45 | %setup -q | |
46 | ||
54a75c0e | 47 | %patch0 -p1 |
915bb6fd | 48 | %patch1 -p1 |
54a75c0e | 49 | |
d99462c6 | 50 | sed -i 's#^AWL_LOCATION="\.\./awl"$#AWL_LOCATION=%{php_data_dir}/awl#' scripts/po/rebuild-translations.sh |
51 | sed -i /^================================================================/q COPYING | |
52 | ||
53 | %build | |
54 | scripts/build-always.sh < inc/always.php.in > htdocs/always.php | |
55 | phpdoc -c docs/api/phpdoc.ini | |
56 | scripts/po/rebuild-translations.sh | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | install -d $RPM_BUILD_ROOT%{_webapps}/%{name} | |
61 | install -d $RPM_BUILD_ROOT%{_appdir} | |
62 | ||
63 | cp -a config/example-config.php $RPM_BUILD_ROOT%{_webapps}/%{name}/config.php | |
64 | cp -a config/example-administration.yml $RPM_BUILD_ROOT%{_webapps}/%{name}/administration.yml | |
54a75c0e | 65 | cp -a inc $RPM_BUILD_ROOT%{_appdir} |
d99462c6 | 66 | cp -a htdocs $RPM_BUILD_ROOT%{_appdir} |
67 | cp -a dba $RPM_BUILD_ROOT%{_appdir} | |
68 | ||
cb7286e7 | 69 | rm -rf $RPM_BUILD_ROOT%{_appdir}/dba/windows |
70 | ||
d99462c6 | 71 | install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/httpd.conf |
72 | install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/apache.conf | |
73 | install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{name}/lighttpd.conf | |
74 | ||
75 | cp -a locale $RPM_BUILD_ROOT%{_datadir} | |
76 | %find_lang %{name} | |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
82 | %webapp_register apache %{name} | |
83 | ||
84 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
85 | %webapp_unregister apache %{name} | |
86 | ||
87 | %triggerin -- apache < 2.2.0, apache-base | |
88 | %webapp_register httpd %{name} | |
89 | ||
90 | %triggerun -- apache < 2.2.0, apache-base | |
91 | %webapp_unregister httpd %{name} | |
92 | ||
93 | %triggerin -- lighttpd | |
94 | %webapp_register lighttpd %{name} | |
95 | ||
96 | %triggerun -- lighttpd | |
97 | %webapp_unregister lighttpd %{name} | |
98 | ||
99 | %files -f %{name}.lang | |
100 | %defattr(644,root,root,755) | |
101 | %doc COPYING ChangeLog CREDITS README TODO | |
102 | %dir %attr(750,root,http) %{_sysconfdir}/webapps/%{name} | |
103 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/config.php | |
104 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/administration.yml | |
105 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/apache.conf | |
106 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/httpd.conf | |
107 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/lighttpd.conf | |
108 | %dir %{_appdir} | |
cb7286e7 | 109 | %dir %{_appdir}/dba |
110 | %{_appdir}/dba/*.sql | |
111 | %{_appdir}/dba/*.txt | |
112 | %{_appdir}/dba/patches | |
113 | %{_appdir}/dba/views | |
114 | %attr(755,root,root) %{_appdir}/dba/create-database.sh | |
115 | %attr(755,root,root) %{_appdir}/dba/update-davical-database | |
54a75c0e | 116 | %{_appdir}/htdocs |
117 | %{_appdir}/inc |