From 49ce9ce3197ffbb614da0b65744ebf8edc965e9f Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:13:00 +0300 Subject: [PATCH] docbook.org/xsl (#3418) * new file: projects/docbook.org/xsl/package.yml new file: projects/docbook.org/xsl/test.xml * both need unzip --------- Co-authored-by: Jacob Heider --- projects/docbook.org/xsl/package.yml | 38 ++++++++++++++++++++++++++++ projects/docbook.org/xsl/test.xml | 14 ++++++++++ 2 files changed, 52 insertions(+) create mode 100644 projects/docbook.org/xsl/package.yml create mode 100644 projects/docbook.org/xsl/test.xml diff --git a/projects/docbook.org/xsl/package.yml b/projects/docbook.org/xsl/package.yml new file mode 100644 index 00000000..6973de5e --- /dev/null +++ b/projects/docbook.org/xsl/package.yml @@ -0,0 +1,38 @@ +distributable: + url: https://github.com/docbook/xslt10-stylesheets/releases/download/release/{{version}}/docbook-xsl-{{version}}.zip + strip-components: 1 +display-name: docbook-xsl +versions: + url: https://cdn.docbook.org/release/xsl/ + match: /\d+\.\d+\.\d+/ +entrypoint: tea $DOCBOOK_XSL_ROOT="{{prefix}}" ./entrypoint.sh +dependencies: + docbook.org: ^5 + gnome.org/libxml2: '*' +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + gnu.org/wget: '*' + info-zip.org/unzip: '*' + script: + - run: mkdir -p libexec share/doc + working-directory: "{{prefix}}" + - cp -r docbook-xsl-{{version}} {{prefix}}/libexec/docbook-xsl + - wget $RES_NS && unzip docbook-xsl-nons-{{version}}.zip + - cp -r docbook-xsl-nons-{{version}} {{prefix}}/libexec/docbook-xsl-ns + - wget $RES_DOC && unzip docbook-xsl-doc-{{version}}.zip + - cp -r docbook-xsl-{{version}}/doc {{prefix}}/share/doc/reference + - run: ln -s ../libexec/docbook-xsl/epub/bin/dbtoepub dbtoepub + working-directory: "{{prefix}}/bin" + env: + RES_NS: https://github.com/docbook/xslt10-stylesheets/releases/download/release/{{version}}/docbook-xsl-nons-{{version}}.zip + RES_DOC: https://github.com/docbook/xslt10-stylesheets/releases/download/release/{{version}}/docbook-xsl-doc-{{version}}.zip +provides: + - bin/dbtoepub +test: + dependencies: + gnome.org/libxslt: '*' + script: + - xsltproc {{prefix}}/libexec/docbook-xsl/html/docbook.xsl test.xml > test.html + - cat test.html | grep "text/html" diff --git a/projects/docbook.org/xsl/test.xml b/projects/docbook.org/xsl/test.xml new file mode 100644 index 00000000..463e5921 --- /dev/null +++ b/projects/docbook.org/xsl/test.xml @@ -0,0 +1,14 @@ + + +
+ Test Article +
+ TEA + It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). +
+
+ XYZ + There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. +
+