]> git.pld-linux.org Git - packages/davical.git/blob - davical.spec
- updated gettext BR
[packages/davical.git] / davical.spec
1 # TODO:
2 # - package docs?
3 # - test lighttpd config
4 Summary:        CalDAV Server
5 Summary(pl.UTF-8):      Serwer CalDAV
6 Name:           davical
7 Version:        1.0.2
8 Release:        0.7
9 License:        GPL v2
10 Group:          Applications
11 Source0:        http://debian.mcmillan.net.nz/packages/davical/%{name}-%{version}.tar.gz
12 # Source0-md5:  340ab213a6303742c66a8028989c2027
13 Source1:        %{name}.conf
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)
23 Requires:       perl(YAML)
24 Requires:       perl-base
25 Requires:       php-awl >= 0.48
26 Requires:       php-pcre
27 Requires:       php-pdo-pgsql
28 Requires:       php-session
29 Requires:       webapps
30 Requires:       webserver(access)
31 Requires:       webserver(alias)
32 Requires:       webserver(php)
33 Suggests:       webserver(indexfile)
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _appdir         %{_datadir}/%{name}
38 %define         _webapps        /etc/webapps
39
40 %description
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.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48 %patch1 -p1
49 %patch2 -p1
50
51 sed -i 's#^AWL_LOCATION="\.\./awl"$#AWL_LOCATION=%{php_data_dir}/awl#' scripts/po/rebuild-translations.sh
52 sed -i /^================================================================/q COPYING
53
54 %build
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
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_webapps}/%{name}
64 install -d $RPM_BUILD_ROOT%{_appdir}
65
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}
71
72 rm -rf $RPM_BUILD_ROOT%{_appdir}/dba/windows
73 rm -f $RPM_BUILD_ROOT%{_appdir}/inc/always.php.in*
74
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
78
79 cp -a locale $RPM_BUILD_ROOT%{_datadir}
80 %find_lang %{name}
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %triggerin -- apache1 < 1.3.37-3, apache1-base
86 %webapp_register apache %{name}
87
88 %triggerun -- apache1 < 1.3.37-3, apache1-base
89 %webapp_unregister apache %{name}
90
91 %triggerin -- apache < 2.2.0, apache-base
92 %webapp_register httpd %{name}
93
94 %triggerun -- apache < 2.2.0, apache-base
95 %webapp_unregister httpd %{name}
96
97 %triggerin -- lighttpd
98 %webapp_register lighttpd %{name}
99
100 %triggerun -- lighttpd
101 %webapp_unregister lighttpd %{name}
102
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
112 %dir %{_appdir}
113 %dir %{_appdir}/dba
114 %{_appdir}/dba/*.sql
115 %{_appdir}/dba/*.txt
116 %{_appdir}/dba/patches
117 %{_appdir}/dba/views
118 %attr(755,root,root) %{_appdir}/dba/create-database.sh
119 %attr(755,root,root) %{_appdir}/dba/update-davical-database
120 %{_appdir}/htdocs
121 %{_appdir}/inc
This page took 0.072808 seconds and 3 git commands to generate.