From 0f7a6e1c50d3d0375cd80a62d8c855741c2e7d19 Mon Sep 17 00:00:00 2001 From: frank Date: Sat, 19 Feb 2005 14:12:33 +0000 Subject: [PATCH] fix for OGo Bug #1254 git-svn-id: http://svn.opengroupware.org/SOPE/trunk@574 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- maintenance/mod_ngobjweb_conectiva10.spec | 122 ++++++++++++++++-- maintenance/mod_ngobjweb_fedora.spec | 119 +++++++++++++++-- maintenance/mod_ngobjweb_mdk100.spec | 121 ++++++++++++++++-- maintenance/mod_ngobjweb_mdk101.spec | 121 ++++++++++++++++-- maintenance/mod_ngobjweb_redhat9.spec | 121 ++++++++++++++++-- maintenance/mod_ngobjweb_rhel3.spec | 121 ++++++++++++++++-- maintenance/mod_ngobjweb_sles9.spec | 149 ++++++++++++++++++---- maintenance/mod_ngobjweb_slss8.spec | 149 ++++++++++++++++++---- maintenance/mod_ngobjweb_suse82.spec | 149 ++++++++++++++++++---- maintenance/mod_ngobjweb_suse91.spec | 149 ++++++++++++++++++---- maintenance/mod_ngobjweb_suse92.spec | 149 ++++++++++++++++++---- 11 files changed, 1302 insertions(+), 168 deletions(-) diff --git a/maintenance/mod_ngobjweb_conectiva10.spec b/maintenance/mod_ngobjweb_conectiva10.spec index 6c28934f..9d9eed69 100644 --- a/maintenance/mod_ngobjweb_conectiva10.spec +++ b/maintenance/mod_ngobjweb_conectiva10.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/apache/modules +%define apache_conf_dir %{_sysconfdir}/apache/conf/conf.d +%define ngobjweb_requires apache + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,14 +12,14 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: apache ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,16 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS_INCLUDE_DIRS="-I/usr/include/apache" # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/apache/modules -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/apache/modules/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/apache/conf/conf.d/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache/modules/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache/conf/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi + +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -47,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache/modules/mod_ngobjweb.so -%config %{_sysconfdir}/apache/conf/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to the application RPMS * Wed Jan 12 2005 Frank Reppin diff --git a/maintenance/mod_ngobjweb_fedora.spec b/maintenance/mod_ngobjweb_fedora.spec index a6fd62b5..f94e6ef7 100644 --- a/maintenance/mod_ngobjweb_fedora.spec +++ b/maintenance/mod_ngobjweb_fedora.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/httpd/modules +%define apache_conf_dir %{_sysconfdir}/httpd/conf.d +%define ngobjweb_requires httpd + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,7 +12,7 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: httpd ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS_INCLUDE_DIRS="-I/usr/include/httpd -I/usr/in # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/httpd/modules -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/httpd/modules/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/httpd/modules/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/httpd/modules/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to the application RPMS * Thu Dec 23 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_mdk100.spec b/maintenance/mod_ngobjweb_mdk100.spec index e409928a..584335f3 100644 --- a/maintenance/mod_ngobjweb_mdk100.spec +++ b/maintenance/mod_ngobjweb_mdk100.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/httpd/conf.d +%define ngobjweb_requires apache2 + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,14 +12,14 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: apache2 ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/apache2/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to the application RPMS * Thu Dec 23 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_mdk101.spec b/maintenance/mod_ngobjweb_mdk101.spec index 7c550336..4c0a8788 100644 --- a/maintenance/mod_ngobjweb_mdk101.spec +++ b/maintenance/mod_ngobjweb_mdk101.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/httpd/conf.d +%define ngobjweb_requires apache2 + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,14 +12,14 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: apache2 ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/apache2/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to the application RPMS * Thu Dec 23 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_redhat9.spec b/maintenance/mod_ngobjweb_redhat9.spec index 1b4b488e..36c17178 100644 --- a/maintenance/mod_ngobjweb_redhat9.spec +++ b/maintenance/mod_ngobjweb_redhat9.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/httpd/modules +%define apache_conf_dir %{_sysconfdir}/httpd/conf.d +%define ngobjweb_requires httpd + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,14 +12,14 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: httpd ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS_INCLUDE_DIRS="-I/usr/include/httpd" # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/httpd/modules -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/httpd/modules/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/httpd/modules/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/httpd/modules/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to the application RPMS * Thu Dec 23 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_rhel3.spec b/maintenance/mod_ngobjweb_rhel3.spec index ebd254b8..165f3b7a 100644 --- a/maintenance/mod_ngobjweb_rhel3.spec +++ b/maintenance/mod_ngobjweb_rhel3.spec @@ -1,3 +1,7 @@ +%define apache_modules_dir %{_usr}/lib/httpd/modules +%define apache_conf_dir %{_sysconfdir}/httpd/conf.d +%define ngobjweb_requires httpd + Summary: mod_ngobjweb apache module Name: mod_ngobjweb Version: %{mod_ngobjweb_version} @@ -8,14 +12,14 @@ License: LGPL URL: http://sope.opengroupware.org/ Group: Development/Libraries AutoReqProv: off -Requires: httpd ogo-environment +Requires: %{ngobjweb_requires} ogo-environment Source: %{mod_ngobjweb_source} Prefix: %{mod_ngobjweb_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS_INCLUDE_DIRS="-I/usr/include/httpd" # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/httpd/modules -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}/usr/lib/httpd/modules/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/httpd/modules/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,11 +141,21 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/httpd/modules/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_sles9.spec b/maintenance/mod_ngobjweb_sles9.spec index 6dd72c2f..86c76615 100644 --- a/maintenance/mod_ngobjweb_sles9.spec +++ b/maintenance/mod_ngobjweb_sles9.spec @@ -1,21 +1,25 @@ -Summary: mod_ngobjweb apache module -Name: mod_ngobjweb -Version: %{mod_ngobjweb_version} -Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} -Vendor: OpenGroupware.org -Packager: Frank Reppin -License: LGPL -URL: http://sope.opengroupware.org/ -Group: Development/Libraries -AutoReqProv: off -Requires: apache2 ogo-environment -Source: %{mod_ngobjweb_source} -Prefix: %{mod_ngobjweb_prefix} -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/apache2/conf.d +%define ngobjweb_requires apache2 + +Summary: mod_ngobjweb apache module +Name: mod_ngobjweb +Version: %{mod_ngobjweb_version} +Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} +Vendor: OpenGroupware.org +Packager: Frank Reppin +License: LGPL +URL: http://sope.opengroupware.org/ +Group: Development/Libraries +AutoReqProv: off +Requires: %{ngobjweb_requires} ogo-environment +Source: %{mod_ngobjweb_source} +Prefix: %{mod_ngobjweb_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}%{_usr}/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{_usr}/lib/apache2/mod_ngobjweb.so +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,18 +141,28 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/apache2/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin - requires apache2 -obviously- - mod_ngobjweb.so lives in /usr/lib/apache2/modules now - OGo.conf lives in /etc/apache2/conf.d now... -- which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 + which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 * Wed Dec 21 2004 Frank Reppin - dealt with http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1084 * Wed Sep 09 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_slss8.spec b/maintenance/mod_ngobjweb_slss8.spec index 09aee212..1889d2cf 100644 --- a/maintenance/mod_ngobjweb_slss8.spec +++ b/maintenance/mod_ngobjweb_slss8.spec @@ -1,21 +1,25 @@ -Summary: mod_ngobjweb apache module -Name: mod_ngobjweb -Version: %{mod_ngobjweb_version} -Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} -Vendor: OpenGroupware.org -Packager: Frank Reppin -License: LGPL -URL: http://sope.opengroupware.org/ -Group: Development/Libraries -AutoReqProv: off -Requires: apache ogo-environment -Source: %{mod_ngobjweb_source} -Prefix: %{mod_ngobjweb_prefix} -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +%define apache_modules_dir %{_usr}/lib/apache +%define apache_conf_dir %{_sysconfdir}/httpd +%define ngobjweb_requires apache + +Summary: mod_ngobjweb apache module +Name: mod_ngobjweb +Version: %{mod_ngobjweb_version} +Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} +Vendor: OpenGroupware.org +Packager: Frank Reppin +License: LGPL +URL: http://sope.opengroupware.org/ +Group: Development/Libraries +AutoReqProv: off +Requires: %{ngobjweb_requires} ogo-environment +Source: %{mod_ngobjweb_source} +Prefix: %{mod_ngobjweb_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs" APXS_INCLUDE_DIRS="-I/usr/i # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}%{_usr}/lib/apache -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{_usr}/lib/apache/mod_ngobjweb.so +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,17 +141,27 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache/mod_ngobjweb.so -%config %{_sysconfdir}/httpd/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin - requires apache -obviously- - mod_ngobjweb.so lives in /usr/lib/apache/modules now - OGo.conf lives in /etc/httpd/conf.d now... -- which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 + which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 * Wed Sep 09 2004 Frank Reppin - initial build diff --git a/maintenance/mod_ngobjweb_suse82.spec b/maintenance/mod_ngobjweb_suse82.spec index 6450fdf3..483d1157 100644 --- a/maintenance/mod_ngobjweb_suse82.spec +++ b/maintenance/mod_ngobjweb_suse82.spec @@ -1,21 +1,25 @@ -Summary: mod_ngobjweb apache module -Name: mod_ngobjweb -Version: %{mod_ngobjweb_version} -Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} -Vendor: OpenGroupware.org -Packager: Frank Reppin -License: LGPL -URL: http://sope.opengroupware.org/ -Group: Development/Libraries -AutoReqProv: off -Requires: apache2 ogo-environment -Source: %{mod_ngobjweb_source} -Prefix: %{mod_ngobjweb_prefix} -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/apache2/conf.d +%define ngobjweb_requires apache2 + +Summary: mod_ngobjweb apache module +Name: mod_ngobjweb +Version: %{mod_ngobjweb_version} +Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} +Vendor: OpenGroupware.org +Packager: Frank Reppin +License: LGPL +URL: http://sope.opengroupware.org/ +Group: Development/Libraries +AutoReqProv: off +Requires: %{ngobjweb_requires} ogo-environment +Source: %{mod_ngobjweb_source} +Prefix: %{mod_ngobjweb_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}%{_usr}/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{_usr}/lib/apache2/mod_ngobjweb.so +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,17 +141,27 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/apache2/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin - requires apache2 -obviously- - mod_ngobjweb.so lives in /usr/lib/apache2/modules now - OGo.conf lives in /etc/apache2/conf.d now... -- which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 + which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 * Wed Sep 09 2004 Frank Reppin - initial build diff --git a/maintenance/mod_ngobjweb_suse91.spec b/maintenance/mod_ngobjweb_suse91.spec index 6dd72c2f..86c76615 100644 --- a/maintenance/mod_ngobjweb_suse91.spec +++ b/maintenance/mod_ngobjweb_suse91.spec @@ -1,21 +1,25 @@ -Summary: mod_ngobjweb apache module -Name: mod_ngobjweb -Version: %{mod_ngobjweb_version} -Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} -Vendor: OpenGroupware.org -Packager: Frank Reppin -License: LGPL -URL: http://sope.opengroupware.org/ -Group: Development/Libraries -AutoReqProv: off -Requires: apache2 ogo-environment -Source: %{mod_ngobjweb_source} -Prefix: %{mod_ngobjweb_prefix} -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/apache2/conf.d +%define ngobjweb_requires apache2 + +Summary: mod_ngobjweb apache module +Name: mod_ngobjweb +Version: %{mod_ngobjweb_version} +Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} +Vendor: OpenGroupware.org +Packager: Frank Reppin +License: LGPL +URL: http://sope.opengroupware.org/ +Group: Development/Libraries +AutoReqProv: off +Requires: %{ngobjweb_requires} ogo-environment +Source: %{mod_ngobjweb_source} +Prefix: %{mod_ngobjweb_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}%{_usr}/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{_usr}/lib/apache2/mod_ngobjweb.so +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,18 +141,28 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/apache2/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin - requires apache2 -obviously- - mod_ngobjweb.so lives in /usr/lib/apache2/modules now - OGo.conf lives in /etc/apache2/conf.d now... -- which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 + which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 * Wed Dec 21 2004 Frank Reppin - dealt with http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1084 * Wed Sep 09 2004 Frank Reppin diff --git a/maintenance/mod_ngobjweb_suse92.spec b/maintenance/mod_ngobjweb_suse92.spec index 6dd72c2f..86c76615 100644 --- a/maintenance/mod_ngobjweb_suse92.spec +++ b/maintenance/mod_ngobjweb_suse92.spec @@ -1,21 +1,25 @@ -Summary: mod_ngobjweb apache module -Name: mod_ngobjweb -Version: %{mod_ngobjweb_version} -Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} -Vendor: OpenGroupware.org -Packager: Frank Reppin -License: LGPL -URL: http://sope.opengroupware.org/ -Group: Development/Libraries -AutoReqProv: off -Requires: apache2 ogo-environment -Source: %{mod_ngobjweb_source} -Prefix: %{mod_ngobjweb_prefix} -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/apache2/conf.d +%define ngobjweb_requires apache2 + +Summary: mod_ngobjweb apache module +Name: mod_ngobjweb +Version: %{mod_ngobjweb_version} +Release: %{mod_ngobjweb_release}.%{mod_ngobjweb_buildcount}%{dist_suffix} +Vendor: OpenGroupware.org +Packager: Frank Reppin +License: LGPL +URL: http://sope.opengroupware.org/ +Group: Development/Libraries +AutoReqProv: off +Requires: %{ngobjweb_requires} ogo-environment +Source: %{mod_ngobjweb_source} +Prefix: %{mod_ngobjweb_prefix} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Enables apache to handle HTTP requests for the -OpenGroupware.org application server +OpenGroupware.org application server. %prep rm -fr ${RPM_BUILD_ROOT} @@ -29,17 +33,106 @@ make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/ # ****************************** install ****************************** %install export PATH=$PATH:/usr/sbin -mkdir -p ${RPM_BUILD_ROOT}%{_usr}/lib/apache2 -cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{_usr}/lib/apache2/mod_ngobjweb.so +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ -mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} echo "#Here we load the 'mod_ngobjweb.so' module # -LoadModule ngobjweb_module %{_usr}/lib/apache2/mod_ngobjweb.so -" > ${RPM_BUILD_ROOT}%{_sysconfdir}/apache2/conf.d/ngobjweb.conf +LoadModule ngobjweb_module %{apache_modules_dir}/mod_ngobjweb.so +" > ${RPM_BUILD_ROOT}%{apache_conf_dir}/ngobjweb.conf + +# touch ghosts +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-webui.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-xmlrpcd.conf +touch ${RPM_BUILD_ROOT}%{apache_conf_dir}/ogo-zidestore.conf # ****************************** post ********************************* +%preun +if [ $1 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi + +# ****************************** trigger ****************************** +%triggerin -- ogo-webui-app +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware10a.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.0a/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +fi + +%triggerin -- ogo-xmlrpcd +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +fi + +%triggerin -- ogo-zidestore +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf +fi + +%triggerun -- ogo-webui-app +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-webui.conf ]; then + rm -f %{apache_conf_dir}/ogo-webui.conf + fi +fi + +%triggerun -- ogo-xmlrpcd +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-xmlrpcd.conf ]; then + rm -f %{apache_conf_dir}/ogo-xmlrpcd.conf + fi +fi +%triggerun -- ogo-zidestore +if [ $2 = 0 ]; then + if [ -f %{apache_conf_dir}/ogo-zidestore.conf ]; then + rm -f %{apache_conf_dir}/ogo-zidestore.conf + fi +fi # ****************************** clean ******************************** %clean @@ -48,18 +141,28 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** files ******************************** %files %defattr(-,root,root,-) -%{_usr}/lib/apache2/mod_ngobjweb.so -%config %{_sysconfdir}/apache2/conf.d/ngobjweb.conf +%{apache_modules_dir}/mod_ngobjweb.so +%config %{apache_conf_dir}/ngobjweb.conf +%ghost %{apache_conf_dir}/ogo-webui.conf +%ghost %{apache_conf_dir}/ogo-xmlrpcd.conf +%ghost %{apache_conf_dir}/ogo-zidestore.conf # ********************************* changelog ************************* %changelog +* Sat Feb 19 2005 Frank Reppin +- replaced common vars with 2 new macros (will make editing safer) +- revisited last commit regarding OGo Bug #1254 and decided + to use triggers instead (and thus nothing moved into the application RPMS) +- application specific config files get installed/removed based on whether + the application itself is installed/removed and/or mod_ngobjweb itself gets + removed or installed * Fri Feb 18 2005 Frank Reppin - moved parts to application RPMS * Thu Dec 23 2004 Frank Reppin - requires apache2 -obviously- - mod_ngobjweb.so lives in /usr/lib/apache2/modules now - OGo.conf lives in /etc/apache2/conf.d now... -- which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 + which fixes -> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1020 * Wed Dec 21 2004 Frank Reppin - dealt with http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1084 * Wed Sep 09 2004 Frank Reppin -- 2.39.5