davical/davical.spec

changeset 458
153370aaf13f
parent 361
45eaa38991fd
child 585
2dd48c9debd6
equal deleted inserted replaced
7:a2712f4bcafa 8:ad89366e635d
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # package version 24 # package version
25 %define V_opkg 0.9.9.5 25 %define V_opkg 0.9.9.7
26 %define V_davical 0.9.9.5 26 %define V_davical 0.9.9.7
27 %define V_awl 0.47 27 %define V_awl 0.49
28 28
29 # package information 29 # package information
30 Name: davical 30 Name: davical
31 Summary: CalDAV Server 31 Summary: CalDAV Server
32 URL: http://rscds.sourceforge.net/ 32 URL: http://rscds.sourceforge.net/
35 Distribution: OpenPKG Community 35 Distribution: OpenPKG Community
36 Class: EVAL 36 Class: EVAL
37 Group: Network 37 Group: Network
38 License: GPL 38 License: GPL
39 Version: %{V_opkg} 39 Version: %{V_opkg}
40 Release: 20110915 40 Release: 20111130
41 41
42 # package options 42 # package options
43 %define with_ssl no 43 %define with_ssl no
44 44
45 # list of sources 45 # list of sources
84 regex = davical-(__VER__)\.tar\.gz 84 regex = davical-(__VER__)\.tar\.gz
85 } 85 }
86 prog davical:awl = { 86 prog davical:awl = {
87 version = %{V_awl} 87 version = %{V_awl}
88 url = http://debian.mcmillan.net.nz/packages/awl/ 88 url = http://debian.mcmillan.net.nz/packages/awl/
89 regex = awl_(__VER__)\.tar\.gz 89 regex = awl-(__VER__)\.tar\.gz
90 } 90 }
91 91
92 %prep 92 %prep
93 %setup -q -c 93 %setup -q -c
94 %setup -q -T -D -a 1 94 %setup -q -T -D -a 1
96 %{l_shtool} subst \ 96 %{l_shtool} subst \
97 -e 's;../awl/VERSION;../awl-%{V_awl}/VERSION;' \ 97 -e 's;../awl/VERSION;../awl-%{V_awl}/VERSION;' \
98 davical-%{V_davical}/scripts/build-always.sh 98 davical-%{V_davical}/scripts/build-always.sh
99 99
100 %build 100 %build
101 cd davical-%{V_davical} && %{l_make} %{l_mflags} htdocs/always.php 101 ln -s awl-%{V_awl} awl
102 ( cd davical-%{V_davical}
103 %{l_shtool} subst %{l_value -s -a} inc/always.php.in
104 %{l_make} %{l_mflags} htdocs/always.php
105 ) || exit $?
102 106
103 %install 107 %install
104 # remove build cruft 108 # remove build cruft
105 rm -rf $RPM_BUILD_ROOT 109 rm -rf $RPM_BUILD_ROOT
106 110
133 %{l_shtool} install -c -m 644 %{l_value -s -a} \ 137 %{l_shtool} install -c -m 644 %{l_value -s -a} \
134 %{SOURCE davical-config.php} \ 138 %{SOURCE davical-config.php} \
135 $RPM_BUILD_ROOT%{l_prefix}/etc/davical/ 139 $RPM_BUILD_ROOT%{l_prefix}/etc/davical/
136 140
137 # install DAViCal Apache configuration file 141 # install DAViCal Apache configuration file
142 l_hostname=`%{l_shtool} echo -e %h`
143 l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
138 %{l_shtool} install -c -m 644 %{l_value -s -a} \ 144 %{l_shtool} install -c -m 644 %{l_value -s -a} \
145 -e "s;@l_hostname@;$l_hostname;g" \
146 -e "s;@l_domainname@;$l_domainname;g" \
139 %{SOURCE davical-apache.conf} \ 147 %{SOURCE davical-apache.conf} \
140 $RPM_BUILD_ROOT%{l_prefix}/etc/davical/ 148 $RPM_BUILD_ROOT%{l_prefix}/etc/davical/
141 149
142 # install run-command script 150 # install run-command script
143 %if "%{with_ssl}" == "yes" 151 %if "%{with_ssl}" == "yes"
160 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/davical/davical/inc/*.in 168 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/davical/davical/inc/*.in
161 169
162 # determine installation files 170 # determine installation files
163 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 171 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
164 %{l_files_std} \ 172 %{l_files_std} \
165 '%config %{l_prefix}/etc/davical/*' \ 173 '%config %attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/etc/davical/*' \
174 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*' \
175 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*' \
176 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*' \
177 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*/*' \
178 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*/*/*' \
166 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical' \ 179 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical' \
167 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical/*' 180 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical/*'
168 181
169 %files -f files 182 %files -f files
170 183
177 ( echo "1. To complete this installation of DAViCal please start" 190 ( echo "1. To complete this installation of DAViCal please start"
178 echo " PostgreSQL and initialize the DAViCal database like this:" 191 echo " PostgreSQL and initialize the DAViCal database like this:"
179 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc postgresql start" 192 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc postgresql start"
180 echo " \$ $RPM_INSTALL_PREFIX/sbin/davical-setup install" 193 echo " \$ $RPM_INSTALL_PREFIX/sbin/davical-setup install"
181 echo "" 194 echo ""
195 %if "%{with_ssl}" == "yes"
182 echo "2. By default, DAViCal runs its own SSL/TLS based Apache server" 196 echo "2. By default, DAViCal runs its own SSL/TLS based Apache server"
183 echo " under 127.0.0.1, TCP port 8443. Please change this by editing" 197 echo " under 127.0.0.1, TCP port 8443. Please change this by editing"
184 echo " the \"Listen 127.0.0.1:8443\" directive in:" 198 echo " the \"Listen 127.0.0.1:8443\" directive in:"
199 %else
200 echo "2. By default, DAViCal runs its own Apache server"
201 echo " under 127.0.0.1, TCP port 8080. Please change this by editing"
202 echo " the \"Listen 127.0.0.1:8080\" directive in:"
203 %endif
185 echo " $RPM_INSTALL_PREFIX/etc/davical/davical-apache.conf" 204 echo " $RPM_INSTALL_PREFIX/etc/davical/davical-apache.conf"
186 echo "" 205 echo ""
187 echo "3. Now start DAViCal by running the command" 206 echo "3. Now start DAViCal by running the command"
188 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc davical start" 207 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc davical start"
189 echo " and connect with a browser to the URL" 208 echo " and connect with a browser to the URL"

mercurial