Author: glen                         Date: Fri Dec 30 14:38:11 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fix man2html-cgi package (convert to webapps); rel 3

---- Files affected:
SPECS:
   man.spec (1.111 -> 1.112) 

---- Diffs:

================================================================
Index: SPECS/man.spec
diff -u SPECS/man.spec:1.111 SPECS/man.spec:1.112
--- SPECS/man.spec:1.111        Tue Dec 13 14:58:51 2005
+++ SPECS/man.spec      Fri Dec 30 15:38:06 2005
@@ -6,12 +6,12 @@
 Summary(ko):   šŽź­ °üˇĂ ľľą¸ ¸đŔ˝ : ¸Ç, apropos ą×¸Ž°í whatis
 Summary(pl):   Czytnik stron man
 Summary(pt_BR):        Leitor de páginas de manuais (man)
-Summary(tr):   Kýlavuz sayfasý okuyucusu
 Summary(ru):   îÁÂĎŇ ŐÔÉĚÉÔ ÄĚŃ ÄĎËŐÍĹÎÔÁĂÉÉ: man, apropos É whatis
+Summary(tr):   Kýlavuz sayfasý okuyucusu
 Summary(uk):   îÁÂŚŇ ŐÔÉĚŚÔ ÄĚŃ ÄĎËŐÍĹÎÔÁĂŚ§: man, apropos ÔÁ whatis
 Name:          man
 Version:       1.6b
-Release:       2
+Release:       3
 License:       GPL
 Group:         Applications/System
 Source0:       
http://primates.ximian.com/~flucifredi/man/%{name}-%{version}.tar.gz
@@ -38,6 +38,8 @@
 Patch15:       %{name}-cgi_paths.patch
 URL:           http://primates.ximian.com/~flucifredi/man/
 BuildRequires: less
+BuildRequires: rpmbuild(macros) >= 1.276
+BuildRequires: sed >= 4.0
 Requires(post,preun):  fileutils
 Requires:      %{name}-config = %{version}-%{release}
 Requires:      /bin/awk
@@ -59,6 +61,9 @@
 
 %define                _cgibinmandir           /usr/lib/cgi-bin/man
 %define                _cgiauxmandir           /usr/share/man2html-cgi
+%define                _webapps        /etc/webapps
+%define                _webapp         man2html
+%define                _webappdir      %{_webapps}/%{_webapp}
 
 %description
 The man package includes three tools for finding information and/or
@@ -168,6 +173,9 @@
 Requires:      %{name}-whatis = %{version}-%{release}
 Requires:      FHS >= 2.3-12
 Requires:      man2html = %{version}-%{release}
+Requires:      webapps
+Conflicts:     apache-base < 2.2.0-7.2
+Conflicts:     apache1 < 1.3.34-5.11
 
 %description -n man2html-cgi
 These scripts allows read man pages throught WWW browser. It uses
@@ -202,6 +210,13 @@
 # use gzip (not bzip2) to compress formatted man pages
 sed -i -e 's/compress=$/compress=gzip/' configure
 
+cat << 'EOF' > apache.conf
+ScriptAlias /cgi-bin/man %{_cgibinmandir}
+<Directory %{_cgibinmandir}>
+       Allow from all
+</Directory>
+EOF
+
 %build
 ./configure \
        -default \
@@ -216,7 +231,7 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d 
$RPM_BUILD_ROOT{/etc/cron.{daily,weekly},%{_bindir},%{_mandir},%{_sbindir},%{_cgibinmandir},%{_cgiauxmandir}}
 \
-       $RPM_BUILD_ROOT{%{_mandir}/{hu,ja,ko}/man{1,5,8},%{_sysconfdir}/man}
+       $RPM_BUILD_ROOT{%{_mandir}/{hu,ja,ko}/man{1,5,8},%{_webappdir}}
 
 echo '%defattr(644,root,root,755)' > man.lang
 for i in "" bg cs da de el es fi fr gl hr hu id it ja ko nl pl pt pt_BR ro ru \
@@ -256,9 +271,8 @@
 install man/pl/man1/man2html.1 $RPM_BUILD_ROOT%{_mandir}/pl/man1
 install man/ro/man2html.man $RPM_BUILD_ROOT%{_mandir}/ro/man1/man2html.1
 
-cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/man/apache-man2html-cgi.conf
-ScriptAlias /cgi-bin/man %{_cgibinmandir}
-EOF
+install apache.conf $RPM_BUILD_ROOT%{_webappdir}/apache.conf
+install apache.conf $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -285,17 +299,49 @@
 rm -f /var/cache/man/X11R6/??/cat[123456789n]/*
 rm -f /var/cache/man/X11R6/??_??/cat[123456789n]/*
 
-%triggerin -n man2html-cgi -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/man/apache-man2html-cgi.conf -n 
09
+%triggerin -n man2html-cgi -- apache1
+%webapp_register apache %{_webapp}
 
-%triggerun -n man2html-cgi -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1 -n 09
+%triggerun -n man2html-cgi -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -n man2html-cgi -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/man/apache-man2html-cgi.conf -n 
09
+%webapp_register httpd %{_webapp}
 
 %triggerun -n man2html-cgi -- apache >= 2.0.0
-%apache_config_uninstall -v 2 -n 09
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -n man2html-cgi -- man2html-cgi < 1.6b-2.16
+# rescue apache config
+if [ -f /etc/man/apache-man2html-cgi.conf.rpmsave ]; then
+       if [ -d /etc/apache/webapps.d ]; then
+               cp -f %{_webappdir}/apache.conf{,.rpmnew}
+               cp -f /etc/man/apache-man2html-cgi.conf.rpmsave 
%{_webappdir}/apache.conf
+       fi
+
+       if [ -d /etc/httpd/webapps.d ]; then
+               cp -f %{_webappdir}/httpd.conf{,.rpmnew}
+               cp -f /etc/man/apache-man2html-cgi.conf.rpmsave 
%{_webappdir}/httpd.conf
+       fi
+       rm -f /etc/man/apache-man2html-cgi.conf.rpmsave
+fi
+
+# re-register with webapp
+if [ -L /etc/apache/conf.d/09_man.conf ]; then
+       rm -f /etc/apache/conf.d/09_man.conf
+       /usr/sbin/webapp register apache %{_webapp}
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache reload 1>&2
+       fi
+fi
+if [ -L /etc/httpd/httpd.conf/09_man.conf ]; then
+       rm -f /etc/httpd/httpd.conf/09_man.conf
+       /usr/sbin/webapp register httpd %{_webapp}
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd reload 1>&2
+       fi
+fi
+exit 0
 
 %files -f man.lang
 %defattr(644,root,root,755)
@@ -422,8 +468,9 @@
 %{_mandir}/man1/hman.1*
 %lang(el) %{_mandir}/el/man1/hman.1*
 %lang(ja) %{_mandir}/ja/man1/hman.1*
-# it seems to be the only package using this dir
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/man/apache-man2html-cgi.conf
+%dir %attr(750,root,http) %{_webappdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_webappdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_webappdir}/httpd.conf
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -431,6 +478,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.112  2005/12/30 14:38:06  glen
+- fix man2html-cgi package (convert to webapps); rel 3
+
 Revision 1.111  2005/12/13 13:58:51  glen
 - adapterized (sorted %verify attrs)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/man.spec?r1=1.111&r2=1.112&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to