From 7967fe8e367ff1f5a7611e4935cac92ca4676691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 30 Oct 2011 19:17:24 +0200 Subject: [PATCH] Include xml.xsd in xml-common (#750073). --- .gitignore | 1 + sgml-common.spec | 33 +++++++++++++++++++++++++++++++-- sources | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0657b48..37b0ea9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ sgml-common-0.6.3.tgz sgml-common-automake.tar.gz +/xml.xsd diff --git a/sgml-common.spec b/sgml-common.spec index 8725d67..8784844 100644 --- a/sgml-common.spec +++ b/sgml-common.spec @@ -1,6 +1,8 @@ +%global xmlxsdver 2009/01 + Name: sgml-common Version: 0.6.3 -Release: 34%{?dist} +Release: 35%{?dist} Group: Applications/Text Summary: Common SGML catalog and DTD files @@ -21,6 +23,7 @@ Source1: xml.dcl Source2: xml.soc Source3: html.dcl Source4: html.soc +Source5: http://www.w3.org/%{xmlxsdver}/xml.xsd Patch0: sgml-common-umask.patch Patch1: sgml-common-xmldir.patch @@ -40,6 +43,7 @@ up-to-date Open Catalog file. Group: Applications/Text Summary: Common XML catalog and DTD files License: GPL+ +Requires(pre): %{_bindir}/xmlcatalog %description -n xml-common The xml-common is a subpackage of sgml-common which contains @@ -72,6 +76,14 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog # Create an empty XML catalog. XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog %{_bindir}/xmlcatalog --noout --create $XMLCATALOG +# ...and add xml.xsd in it +for type in system uri ; do + for path in 2001 %{xmlxsdver} ; do + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/$path/xml.xsd" \ + "file://%{_datadir}/xml/xml.xsd" $XMLCATALOG + done +done # Now put the common DocBook entries in it %{_bindir}/xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//ENTITIES DocBook XML" \ @@ -98,6 +110,7 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl install -p -m0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ $RPM_BUILD_ROOT%{_datadir}/sgml rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/* +install -p -m0644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/xml # remove installed doc file and prepare installation with %%doc rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html @@ -109,6 +122,18 @@ cp -p doc/HTML/*.html __dist_doc/html/ %clean rm -rf $RPM_BUILD_ROOT +%pre -n xml-common +if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then + for type in system uri ; do + for path in 2001 %{xmlxsdver} ; do + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/$path/xml.xsd" \ + "file://%{_datadir}/xml/xml.xsd" \ + %{_sysconfdir}/xml/catalog + done + done +fi + %files %defattr (-,root,root, -) %doc __dist_doc/html/ AUTHORS NEWS ChangeLog COPYING README @@ -137,8 +162,12 @@ rm -rf $RPM_BUILD_ROOT %dir %{_datadir}/sgml/docbook %{_datadir}/sgml/docbook/xmlcatalog %dir %{_datadir}/xml +%{_datadir}/xml/xml.xsd %changelog +* Sun Oct 30 2011 Ville Skyttä - 0.6.3-35 +- Include xml.xsd in xml-common (#750073). + * Wed Feb 09 2011 Fedora Release Engineering - 0.6.3-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild @@ -220,7 +249,7 @@ rm -rf $RPM_BUILD_ROOT - rebuilt * Mon Dec 8 2003 Tim Waugh 0.6.3-15 -- Patch from Ville Skyttä (bug #111625): +- Patch from Ville Skyttä (bug #111625): - Include /usr/share/xml in xml-common. - Own /usr/share/sgml and /usr/share/xml. diff --git a/sources b/sources index a65a854..128f119 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 103c9828f24820df86e55e7862e28974 sgml-common-0.6.3.tgz 85a611bea6fc1fcdb15c62b373a953e5 sgml-common-automake.tar.gz +85f312ac34d69d898f15f16b57563320 xml.xsd