# Maintainer: PktSurf app=docbook version=1.0 build=1sml homepage="https://docbook.org" download="" xslstylesheetsver=1.79.2 xmldtdver=4.5 xmltover=0.0.28 desc="DocBook DTD for XML" requires="libxslt libxml2" prepbuilddir() { mkandenterbuilddir rm -rf $app-$version tar xf $srcdir/docbook-xml-$xmldtdver.tar.?z* cd docbook-xml-$xmldtdver fixbuilddirpermissions } build() { xml_catalog="$pkg/etc/xml/catalog" xml_docbookcatalog="$pkg/etc/xml/docbook" cd docbook-4.5 # Install 4.x catalog: mkdir -vpm755 $pkg/usr/share/xml/docbook/xml-dtd-$xmldtdver cp -fav docbook.cat *.dtd *.mod ent/ \ $pkg/usr/share/xml/docbook/xml-dtd-$xmldtdver mkdir -vpm755 $pkg/etc/xml xmlcatalog --noout --create $xml_catalog xmlcatalog --noout --create $xml_docbookcatalog xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V${xmldtdver}//EN" \ "http://www.oasis-open.org/docbook/xml/${xmldtdver}/docbookx.dtd" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/calstblx.dtd" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/soextblx.dtd" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/dbpoolx.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/dbhierx.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML HTML Tables V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/htmltblx.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/dbnotnx.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/dbcentx.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V${xmldtdver}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}/dbgenent.mod" \ $xml_docbookcatalog && xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/${xmldtdver}" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}" \ $xml_docbookcatalog && xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/${xmldtdver}" \ "file:///usr/share/xml/docbook/xml-dtd-${xmldtdver}" \ $xml_docbookcatalog || exit 1 xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//ENTITIES DocBook XML" \ "file:///etc/xml/docbook" \ $xml_catalog && xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///etc/xml/docbook" \ $xml_catalog && xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ $xml_catalog && xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ $xml_catalog || exit 1 for DTDVERSION in 4.1.2 4.2 4.3 4.4 do xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \ $xml_docbookcatalog || exit 1 xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-$xmldtdver" \ $xml_docbookcatalog || exit 1 xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-$xmldtdver" \ $xml_docbookcatalog || exit 1 xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ $xml_catalog || exit 1 xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ $xml_catalog || exit 1 done tar xf $srcdir/docbook-xsl-nons-$xslstylesheetsver.tar.?z* cd docbook-xsl-nons-$xslstylesheetsver fixbuilddirpermissions applypatch $srcdir/non-recursive-string-subst.patch install -v -m755 -d "$pkg/usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" cp -v -R VERSION common eclipse epub extensions fo highlighting html \ htmlhelp images javahelp lib manpages params profiling \ roundtrip slides template tests tools webhelp website \ xhtml xhtml-1_1 \ "$pkg/usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" && ( cd "$pkg/usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" ln -s VERSION VERSION.xsl ) xmlcatalog --noout --add "rewriteSystem" \ "http://cdn.docbook.org/release/xsl-nons/$xslstylesheetsver" \ "file://usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 xmlcatalog --noout --add "rewriteURI" \ "http://cdn.docbook.org/release/xsl-nons/$xslstylesheetsver" \ "file://usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 xmlcatalog --noout --add "rewriteSystem" \ "http://cdn.docbook.org/release/xsl-nons/current" \ "file://usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 xmlcatalog --noout --add "rewriteURI" \ "http://cdn.docbook.org/release/xsl-nons/current/" \ "file://usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 xmlcatalog --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 xmlcatalog --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-$xslstylesheetsver" \ $xml_catalog || exit 1 mkfinalpkg } sha512sums=" 2408f9444d84490d31914dfe03ed53199012b9ac42f4562165c099b1e5af1a6a99037f16521b829f5833d5fc2d340cf590f48116aa856e6913f2b880d0ea56d3 docbook-xml-4.5.tar.lz cfa54a7c499d9d964970cfdde065307a113965bac527445b87c52c32b361ca1a7e33b2611a81166ca75c223d6fed84fdec468d4deb6a6097b970dedfa110bf47 docbook-xsl-nons-1.79.2.tar.lz 3199de6b5a61ed25defa50a55fa3d138b60e1f5e4c2e3b9a14e169099189794adc3ac079fa3f62debc682f4840c6dadff40f8bd5a07fdba34fe1016ce885b9e2 non-recursive-string-subst.patch "