From 33e146acc773de87669cc4187b62ff3aa95083bf Mon Sep 17 00:00:00 2001 From: frank Date: Mon, 7 Nov 2005 13:19:31 +0000 Subject: [PATCH] adjust for SUSE 10.0 git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1171 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- maintenance/mod_ngobjweb_suse100.spec | 223 ++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 maintenance/mod_ngobjweb_suse100.spec diff --git a/maintenance/mod_ngobjweb_suse100.spec b/maintenance/mod_ngobjweb_suse100.spec new file mode 100644 index 00000000..54e133dc --- /dev/null +++ b/maintenance/mod_ngobjweb_suse100.spec @@ -0,0 +1,223 @@ +%define apache_modules_dir %{_usr}/lib/apache2 +%define apache_conf_dir %{_sysconfdir}/apache2/conf.d +%define apache_initscript %{_sysconfdir}/init.d/apache2 +%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} +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. + +%prep +rm -fr ${RPM_BUILD_ROOT} +%setup -q -n sope-mod_ngobjweb + +# ****************************** build ******************************** +%build +export PATH=$PATH:/usr/sbin +make %{mod_ngobjweb_makeflags} APXS="/usr/sbin/apxs2" APXS_INCLUDE_DIRS="-I/usr/include/apache2" + +# ****************************** install ****************************** +%install +export PATH=$PATH:/usr/sbin +mkdir -p ${RPM_BUILD_ROOT}%{apache_modules_dir} +cp mod_ngobjweb.so ${RPM_BUILD_ROOT}%{apache_modules_dir}/ + +mkdir -p ${RPM_BUILD_ROOT}%{apache_conf_dir} +echo "#Here we load the 'mod_ngobjweb.so' module +# +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 + %{apache_initscript} restart >/dev/null 2>&1 +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 /OpenGroupware11.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.1/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf + +%{apache_initscript} restart >/dev/null 2>&1 +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 + +%{apache_initscript} restart >/dev/null 2>&1 +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 + +%{apache_initscript} restart >/dev/null 2>&1 +fi + +%triggerin -- ogoall +if [ $2 = 1 ]; then +echo "# configuration needed to access the OGo webui +# +# explicitly allow access + + Order allow,deny + Allow from all + +# required aliases +Alias /OpenGroupware11.woa/WebServerResources/ %{prefix}/share/opengroupware.org-1.1/www/ +Alias /ArticleImages %{_var}/lib/opengroupware.org/news +# +# hook up + + + SetAppPort 20000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-webui.conf +echo "# configuration needed to access the OGo XMLRPCd via http +# +# hook up + + + SetAppPort 22000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-xmlrpcd.conf +echo "# configuration needed to access the OGo ZideStore via http +# +# hook up + + + SetAppPort 21000 + SetHandler ngobjweb-adaptor + + +" >%{apache_conf_dir}/ogo-zidestore.conf + +%{apache_initscript} restart >/dev/null 2>&1 +fi + +%triggerun -- ogoall +if [ $2 = 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 + %{apache_initscript} restart >/dev/null 2>&1 +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 + %{apache_initscript} restart >/dev/null 2>&1 +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 + %{apache_initscript} restart >/dev/null 2>&1 +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 + %{apache_initscript} restart >/dev/null 2>&1 +fi + +# ****************************** clean ******************************** +%clean +rm -fr ${RPM_BUILD_ROOT} + +# ****************************** files ******************************** +%files +%defattr(-,root,root,-) +%{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 +* Mon Nov 07 2005 Frank Reppin +- created as copy from mod_ngobjweb_suse93.spec -- 2.39.5