Эх сурвалжийг харах

docbook-dtds:
- add Relax NG schema format
- add W3C XML (XSD) schema format

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@8798 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 10 жил өмнө
parent
commit
1aade3bc07

+ 97 - 21
d/docbook-dtds/docbook-dtds-vl.spec

@@ -1,6 +1,9 @@
+%global version_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml} 4.{2,3,4,5}-rng 4.{2,3,4,5}-xsd"
+%global catalog_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}"
+
 Name: docbook-dtds
 Version: 1.0
-Release: 56%{?_dist_release}
+Release: 57%{?_dist_release}
 Group: Applications/Text
 
 Summary: SGML and XML document type definitions for DocBook.
@@ -54,6 +57,16 @@ Source9: http://www.docbook.org/sgml/4.4/docbook-4.4.zip
 Source10: http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip
 Source11: http://www.docbook.org/sgml/4.5/docbook-4.5.zip
 Source12: http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip
+Source13: http://www.docbook.org/rng/4.2/docbook-rng-4.2.zip
+Source14: http://www.docbook.org/rng/4.3/docbook-rng-4.3.zip
+Source15: http://www.docbook.org/rng/4.4/docbook-rng-4.4.zip
+#compressed from http://www.docbook.org/rng/4.5/ upstream archive unavailable
+Source16: docbook-rng-4.5.zip
+Source17: http://www.docbook.org/xsd/4.2/docbook-xsd-4.2.zip
+Source18: http://www.docbook.org/xsd/4.3/docbook-xsd-4.3.zip
+Source19: http://www.docbook.org/xsd/4.4/docbook-xsd-4.4.zip
+#compressed from http://www.docbook.org/xsd/4.5/ upstream archive unavailable
+Source20: docbook-xsd-4.5.zip
 # fix old catalog files
 Patch0: docbook-dtd30-sgml-1.0.catalog.patch
 Patch1: docbook-dtd31-sgml-1.0.catalog.patch
@@ -73,7 +86,6 @@ BuildRequires: unzip
 
 %define openjadever 1.3.2
 #PreReq: openjade = %{openjadever}
-%define version_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}"
 
 
 %description
@@ -168,6 +180,54 @@ cd 4.5-xml
 unzip %{SOURCE12}
 cd ..
 
+# Docbook RNG v4.2
+mkdir 4.2-rng
+cd 4.2-rng
+unzip %{SOURCE13}
+cd ..
+
+# Docbook RNG v4.3
+mkdir 4.3-rng
+cd 4.3-rng
+unzip %{SOURCE14}
+cd ..
+
+# Docbook RNG v4.4
+mkdir 4.4-rng
+cd 4.4-rng
+unzip %{SOURCE15}
+cd ..
+
+# Docbook RNG v4.5
+mkdir 4.5-rng
+cd 4.5-rng
+unzip %{SOURCE16}
+cd ..
+
+# Docbook XSD v4.2
+mkdir 4.2-xsd
+cd 4.2-xsd
+unzip %{SOURCE17}
+cd ..
+
+# Docbook XSD v4.3
+mkdir 4.3-xsd
+cd 4.3-xsd
+unzip %{SOURCE18}
+cd ..
+
+# Docbook XSD v4.4
+mkdir 4.4-xsd
+cd 4.4-xsd
+unzip %{SOURCE19}
+cd ..
+
+# Docbook XSD v4.5
+mkdir 4.5-xsd
+cd 4.5-xsd
+unzip %{SOURCE20}
+cd ..
+
 # Fix € in SGML.
 %patch5 -p1
 
@@ -211,11 +271,27 @@ for dir
 do
   cd $dir
   fmt=${dir#*-} ver=${dir%%-*}
-  DESTDIR=$RPM_BUILD_ROOT%{_datadir}/sgml/docbook/$fmt-dtd-$ver
+  case $fmt in
+    sgml)   DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver ;;
+    xml)    DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver ;;
+    rng)    DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-$ver ;;
+    xsd)    DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-$ver ;;
+  esac
   case $fmt in
     sgml)   mkdir -p $DESTDIR ; install *.dcl $DESTDIR ;;
     xml)    mkdir -p $DESTDIR/ent ; install ent/* $DESTDIR/ent ;;
+    rng)    mkdir -p $DESTDIR ; install *.r* $DESTDIR ;;
+    xsd)    mkdir -p $DESTDIR ; install *.xsd $DESTDIR;;
   esac
+  cd ..
+done
+
+eval set %{catalog_list}
+for dir
+do
+  cd $dir
+  fmt=${dir#*-} ver=${dir%%-*}
+  DESTDIR=$RPM_BUILD_ROOT/usr/share/sgml/docbook/$fmt-dtd-$ver
   install *.dtd *.mod $DESTDIR
   install docbook.cat $DESTDIR/catalog
   cd ..
@@ -223,6 +299,12 @@ do
   touch $RPM_BUILD_ROOT/etc/sgml/$fmt-docbook-$ver.cat
 done
 
+#workaround the missing support for --parents hack in rpm 4.11+
+mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}
+for i in */*.txt */ChangeLog */README
+do
+  cp -pr --parents $i $RPM_BUILD_ROOT%{_pkgdocdir}
+done
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -244,18 +326,18 @@ done
 
 # The STYLESHEETS/catalog command is for the case in which the style sheets
 # were installed after another DTD but before this DTD
-for STYLESHEETS in %{_datadir}/sgml/docbook/dsssl-stylesheets-*; do : ; done
+for STYLESHEETS in /usr/share/sgml/docbook/dsssl-stylesheets-*; do : ; done
 case $STYLESHEETS in
   *-"*") STYLESHEETS= ;;
 esac
-eval set %{version_list}
+eval set %{catalog_list}
 for dir
 do
   fmt=${dir#*-} ver=${dir%%-*}
-  sgmldir=%{_datadir}/sgml/docbook/$fmt-dtd-$ver
+  sgmldir=/usr/share/sgml/docbook/$fmt-dtd-$ver
   ## SGML catalog
   # Update the centralized catalog corresponding to this version of the DTD
-  for cat_dir in %{_datadir}/sgml/sgml-iso-entities-8879.1986 $sgmldir $STYLESHEETS; do
+  for cat_dir in /usr/share/sgml/sgml-iso-entities-8879.1986 $sgmldir $STYLESHEETS; do
     $catcmd --sgml --add /etc/sgml/$fmt-docbook-$ver.cat $cat_dir/catalog
   done
   ## XML catalog
@@ -325,7 +407,6 @@ sed -ni '
 # Finally, make sure everything in /etc/sgml is readable!
 /bin/chmod a+r /etc/sgml/*
 
-
 %postun
 catcmd='%{_bindir}/xmlcatalog --noout'
 xmlcatalog=%{_datadir}/sgml/docbook/xmlcatalog
@@ -416,22 +497,17 @@ done
 %doc --parents */*.txt
 %config(noreplace) /etc/sgml/sgml-docbook.cat
 %config(noreplace) /etc/sgml/xml-docbook.cat
-%{_datadir}/sgml/docbook/sgml-dtd-3.0
-%{_datadir}/sgml/docbook/sgml-dtd-3.1
-%{_datadir}/sgml/docbook/sgml-dtd-4.0
-%{_datadir}/sgml/docbook/sgml-dtd-4.1
-%{_datadir}/sgml/docbook/sgml-dtd-4.2
-%{_datadir}/sgml/docbook/sgml-dtd-4.3
-%{_datadir}/sgml/docbook/sgml-dtd-4.4
-%{_datadir}/sgml/docbook/sgml-dtd-4.5
-%{_datadir}/sgml/docbook/xml-dtd-4.1.2
-%{_datadir}/sgml/docbook/xml-dtd-4.2
-%{_datadir}/sgml/docbook/xml-dtd-4.3
-%{_datadir}/sgml/docbook/xml-dtd-4.4
-%{_datadir}/sgml/docbook/xml-dtd-4.5
+%{_datadir}/sgml/docbook/*ml-dtd-*
+%{_datadir}/sgml/docbook/rng-*
+%{_datadir}/sgml/docbook/xsd-*
+%config(noreplace) /etc/sgml/*ml-docbook.cat
 %ghost %config(noreplace) /etc/sgml/*ml-docbook-*.cat
 
 %changelog
+* Wed Jul 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.8-1
+- add Relax NG schema format
+- add W3C XML (XSD) schema format
+
 * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0-56
 - rebuild with VineSeed environment