commit 737580009cf00257cb732b8a388f5112ab0b6af8 Author: EnumDev Date: Thu May 8 16:54:19 2025 +0300 Initial Commit diff --git a/.compilation-options b/.compilation-options new file mode 100644 index 0000000..9c7aafe --- /dev/null +++ b/.compilation-options @@ -0,0 +1 @@ +ARCH=any diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..58161c9 --- /dev/null +++ b/pkg.info @@ -0,0 +1,9 @@ +name: docbook-xml +description: XML scheme for writing documentation +version: 4.5 +url: https://www.oasis-open.org/docbook/ +license: MIT +architecture: any +depends: ["libxml2"] +make_depends: ["libxml2","unzip"] +type: source diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..c1a0e75 --- /dev/null +++ b/source.sh @@ -0,0 +1,112 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +DOWNLOAD="https://www.docbook.org/xml/${BPM_PKG_VERSION}/docbook-xml-${BPM_PKG_VERSION}.zip" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + unzip "$FILENAME" -d "$BPM_SOURCE" +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + install -dvm755 "$BPM_OUTPUT"/usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION} + install -dvm755 "$BPM_OUTPUT"/etc/xml + cp -dr docbook.cat *.dtd ent/ *.mod "$BPM_OUTPUT"/usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION} + + xmlcatalog --noout --create "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --create "$BPM_OUTPUT"/etc/xml/catalog + + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V${BPM_PKG_VERSION}//EN" \ + "http://www.oasis-open.org/docbook/xml/${BPM_PKG_VERSION}/docbookx.dtd" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML CALS Table Model V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/calstblx.dtd" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/soextblx.dtd" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/dbpoolx.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/dbhierx.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/htmltblx.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Notations V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/dbnotnx.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Character Entities V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/dbcentx.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Additional General Entities V${BPM_PKG_VERSION}//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}/dbgenent.mod" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/${BPM_PKG_VERSION}" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/${BPM_PKG_VERSION}" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}" \ + "$BPM_OUTPUT"/etc/xml/docbook + + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//ENTITIES DocBook XML" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD DocBook XML" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + + 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" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ + "file:///usr/share/xml/docbook/xml-dtd-${BPM_PKG_VERSION}" \ + "$BPM_OUTPUT"/etc/xml/docbook + xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ + "file:///etc/xml/docbook" \ + "$BPM_OUTPUT"/etc/xml/catalog + done + + install -d "$BPM_OUTPUT"/usr/share/licenses/docbook-xml + sed -n '/Copyright/,/maintenance/p' dbhierx.mod > "$BPM_OUTPUT"/usr/share/licenses/docbook-xml/LICENSE +}