Skip to content

Commit

Permalink
main/docbook-*: update to use xmlcatmgr trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Dec 10, 2023
1 parent e938ad0 commit 116487d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
10 changes: 10 additions & 0 deletions main/docbook-xml/files/docbook-xml.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rewriteSystem http://www.oasis-open.org/docbook/xml/4.2 /usr/share/xml/docbook/4.2
rewriteSystem http://www.oasis-open.org/docbook/xml/4.3 /usr/share/xml/docbook/4.3
rewriteSystem http://www.oasis-open.org/docbook/xml/4.4 /usr/share/xml/docbook/4.4
rewriteSystem http://www.oasis-open.org/docbook/xml/4.5 /usr/share/xml/docbook/4.5
rewriteSystem http://www.oasis-open.org/docbook/xml/4.1.2 /usr/share/xml/docbook/4.2
nextCatalog /usr/share/xml/docbook/4.2/catalog --
nextCatalog /usr/share/xml/docbook/4.3/catalog --
nextCatalog /usr/share/xml/docbook/4.4/catalog --
nextCatalog /usr/share/xml/docbook/4.5/catalog --
nextCatalog /usr/share/xml/docbook/4.2/catalog-4.1.2 --
24 changes: 7 additions & 17 deletions main/docbook-xml/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "docbook-xml"
pkgver = "4.5"
pkgrel = 0
pkgrel = 1
depends = ["xmlcatmgr"]
pkgdesc = "XML DTD designed for computer documentation"
maintainer = "q66 <q66@chimera-linux.org>"
Expand All @@ -18,22 +18,8 @@
"23068a94ea6fd484b004c5a73ec36a66aa47ea8f0d6b62cc1695931f5c143464",
"acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2",
]
_url = "http://www.oasis-open.org/docbook/xml"
_path = "/usr/share/xml/docbook"
xml_entries = [
("rewriteSystem", f"{_url}/4.2", f"{_path}/4.2"),
("rewriteSystem", f"{_url}/4.3", f"{_path}/4.3"),
("rewriteSystem", f"{_url}/4.4", f"{_path}/4.4"),
("rewriteSystem", f"{_url}/4.5", f"{_path}/4.5"),
("rewriteSystem", f"{_url}/4.1.2", f"{_path}/4.2"),
]
xml_catalogs = [
f"{_path}/4.2/catalog",
f"{_path}/4.3/catalog",
f"{_path}/4.4/catalog",
f"{_path}/4.5/catalog",
f"{_path}/4.2/catalog-4.1.2",
]
# don't validate license because there is no file to download
options = ["!spdx"]


def do_extract(self):
Expand All @@ -43,6 +29,10 @@ def do_extract(self):
def do_install(self):
vers = ["4.2", "4.3", "4.4", "4.5"]

self.install_file(
self.files_path / "docbook-xml.conf", "usr/share/xml/catalogs"
)

for v in vers:
tdir = f"usr/share/xml/docbook/{v}"
fname = f"{pkgname}-{v}.zip"
Expand Down
1 change: 1 addition & 0 deletions main/docbook-xsl-nons/files/docbook-xsl-nons.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nextCatalog /usr/share/xsl-nons/docbook/catalog.xml --
7 changes: 5 additions & 2 deletions main/docbook-xsl-nons/template.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
pkgname = "docbook-xsl-nons"
pkgver = "1.79.2"
pkgrel = 0
pkgrel = 1
depends = ["xmlcatmgr", "docbook-xml"]
pkgdesc = "Docbook XSL modular stylesheet"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://docbook.org"
source = f"https://github.com/docbook/xslt10-stylesheets/releases/download/release/{pkgver}/{pkgname}-{pkgver}.tar.bz2"
sha256 = "ee8b9eca0b7a8f89075832a2da7534bce8c5478fc8fc2676f512d5d87d832102"
xml_catalogs = ["/usr/share/xsl-nons/docbook/catalog.xml"]


def do_install(self):
self.install_license("COPYING")

self.install_file(
self.files_path / "docbook-xsl-nons.conf", "usr/share/xml/catalogs"
)

self.install_file("catalog.xml", "usr/share/xsl-nons/docbook")
self.install_file("VERSION", "usr/share/xsl-nons/docbook")
self.install_file("VERSION.xsl", "usr/share/xsl-nons/docbook")
Expand Down
1 change: 1 addition & 0 deletions main/docbook-xsl/files/docbook-xsl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nextCatalog /usr/share/xsl/docbook/catalog.xml --
7 changes: 5 additions & 2 deletions main/docbook-xsl/template.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
pkgname = "docbook-xsl"
pkgver = "1.79.2"
pkgrel = 0
pkgrel = 1
depends = ["xmlcatmgr", "docbook-xml"]
pkgdesc = "Docbook XSL modular stylesheet"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://docbook.org"
source = f"https://github.com/docbook/xslt10-stylesheets/releases/download/release/{pkgver}/{pkgname}-{pkgver}.tar.bz2"
sha256 = "316524ea444e53208a2fb90eeb676af755da96e1417835ba5f5eb719c81fa371"
xml_catalogs = ["/usr/share/xsl/docbook/catalog.xml"]


def do_install(self):
self.install_license("COPYING")

self.install_file(
self.files_path / "docbook-xsl.conf", "usr/share/xml/catalogs"
)

self.install_file("catalog.xml", "usr/share/xsl/docbook")
self.install_file("VERSION", "usr/share/xsl/docbook")
self.install_file("VERSION.xsl", "usr/share/xsl/docbook")
Expand Down

0 comments on commit 116487d

Please sign in to comment.