1 %define apache_modules_dir %{_usr}/lib/apache
2 %define apache_conf_dir %{_sysconfdir}/httpd
3 %define ngobjweb_requires apache
5 Summary: mod_ngobjweb apache module
7 Version: %{mod_ngobjweb_version}
8 Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix}
9 Vendor: OpenGroupware.org
10 Packager: Frank Reppin <frank@opengroupware.org>
12 URL: http://sope.opengroupware.org/
13 Group: Development/Libraries
15 Requires: %{ngobjweb_requires}
16 Source: %{mod_ngobjweb_source}
17 Prefix: %{mod_ngobjweb_prefix}
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21 Enables apache to handle HTTP requests for the
22 OpenGroupware.org application server.
25 rm -fr ${RPM_BUILD_ROOT}
26 %setup -q -n sope-mod_ngobjweb
28 # ****************************** build ********************************
30 export PATH=$PATH:/usr/sbin
31 make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs" APXS_INCLUDE_DIRS="-I/usr/include/apache"
33 # ****************************** install ******************************
35 export PATH=$PATH:/usr/sbin
36 mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir}
37 cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/
39 mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir}
40 echo "#Here we load the 'mod_ngobjweb.so' module
42 LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so
43 " > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf
46 touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf
47 touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf
48 touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf
50 # ****************************** post *********************************
53 if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then
54 rm -f %{apache_conf_dir}/ogo-webui.conf
56 if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then
57 rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf
59 if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then
60 rm -f %{apache_conf_dir}/ogo-zidestore.conf
64 # ****************************** trigger ******************************
65 %triggerin -- ogo-webui-app
67 echo "# configuration needed to access the OGo webui
69 # explicitly allow access
70 <Directory %{prefix}/share/opengroupware.org-1.0a/www>
75 Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/
76 Alias /ArticleImages %{_var}/lib/opengroupware.org/news
79 <IfModule ngobjweb_module.c>
80 <LocationMatch "^/OpenGroupware*">
82 SetHandler ngobjweb-adaptor
85 " >%{apache_conf_dir}/ogo-webui.conf
88 %triggerin -- ogo-xmlrpcd
90 echo "# configuration needed to access the OGo XMLRPCd via http
93 <IfModule ngobjweb_module.c>
94 <LocationMatch "^/RPC2*">
96 SetHandler ngobjweb-adaptor
99 " >%{apache_conf_dir}/ogo-xmlrpcd.conf
102 %triggerin -- ogo-zidestore
104 echo "# configuration needed to access the OGo ZideStore via http
107 <IfModule ngobjweb_module.c>
108 <LocationMatch "^/zidestore/*">
110 SetHandler ngobjweb-adaptor
113 " >%{apache_conf_dir}/ogo-zidestore.conf
118 echo "# configuration needed to access the OGo webui
120 # explicitly allow access
121 <Directory %{prefix}/share/opengroupware.org-1.0a/www>
126 Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/
127 Alias /ArticleImages %{_var}/lib/opengroupware.org/news
130 <IfModule ngobjweb_module.c>
131 <LocationMatch "^/OpenGroupware*">
133 SetHandler ngobjweb-adaptor
136 " >%{apache_conf_dir}/ogo-webui.conf
137 echo "# configuration needed to access the OGo XMLRPCd via http
140 <IfModule ngobjweb_module.c>
141 <LocationMatch "^/RPC2*">
143 SetHandler ngobjweb-adaptor
146 " >%{apache_conf_dir}/ogo-xmlrpcd.conf
147 echo "# configuration needed to access the OGo ZideStore via http
150 <IfModule ngobjweb_module.c>
151 <LocationMatch "^/zidestore/*">
153 SetHandler ngobjweb-adaptor
156 " >%{apache_conf_dir}/ogo-zidestore.conf
161 if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then
162 rm -f %{apache_conf_dir}/ogo-webui.conf
164 if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then
165 rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf
167 if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then
168 rm -f %{apache_conf_dir}/ogo-zidestore.conf
172 %triggerun -- ogo-webui-app
174 if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then
175 rm -f %{apache_conf_dir}/ogo-webui.conf
179 %triggerun -- ogo-xmlrpcd
181 if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then
182 rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf
186 %triggerun -- ogo-zidestore
188 if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then
189 rm -f %{apache_conf_dir}/ogo-zidestore.conf
193 # ****************************** clean ********************************
195 rm -fr ${RPM_BUILD_ROOT}
197 # ****************************** files ********************************
199 %defattr(-,root,root,-)
200 %{apache_modules_dir}/mod_ngobjweb.so
201 %config %{apache_conf_dir}/ngobjweb.conf
202 %ghost %{apache_conf_dir}/ogo-webui.conf
203 %ghost %{apache_conf_dir}/ogo-xmlrpcd.conf
204 %ghost %{apache_conf_dir}/ogo-zidestore.conf
206 # ********************************* changelog *************************
208 * Tue Mar 01 2005 Frank Reppin <frank@opengroupware.org>
209 - drop dependency on ogo-environment
210 - allow triggers on ogoall package
211 * Sat Feb 19 2005 Frank Reppin <frank@opengroupware.org>
212 - replaced common vars with 2 new macros (will make editing safer)
213 - revisited last commit regarding OGo Bug #1254 and decided
214 to use triggers instead (and thus nothing moved into the application RPMS)
215 - application specific config files get installed/removed based on whether
216 the application itself is installed/removed and/or mod_ngobjweb itself gets
218 * Fri Feb 18 2005 Frank Reppin <frank@opengroupware.org>
219 - moved parts to application RPMS
220 * Thu Dec 23 2004 Frank Reppin <frank@opengroupware.org>
221 - requires apache -obviously-
222 - mod_ngobjweb.so lives in /usr/lib/apache/modules now
223 - OGo.conf lives in /etc/httpd/conf.d now...
224 which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020
225 * Wed Sep 09 2004 Frank Reppin <frank@opengroupware.org>