kind: manual
depends:
- python2-core.bst
- docutils/docbook-xml.bst
sources:
- kind: git
  url: upstream:docbook-xsl
  track: docbook-xsl-1.78.1
  ref: 802da9dd5d4bc18f46a916eedc0c5c1980a15e59
config:
  install-commands:
  - install -v -m755 -d "%{install-root}%{prefix}/share/xml/docbook/xsl-stylesheets-1.78.1"
  - |
    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 \
             "%{install-root}%{prefix}/share/xml/docbook/xsl-stylesheets-1.78.1"
  - ln -s VERSION "%{install-root}%{prefix}/share/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl"
  - install -v -m644 -D README "%{install-root}%{prefix}/share/doc/docbook-xsl-1.78.1/README.txt"
  - |
    install -v -m644    RELEASE-NOTES* NEWS* \
                        "%{install-root}%{prefix}/share/doc/docbook-xsl-1.78.1"
  - if [ ! -d "%{install-root}/etc/xml" ]; then install -v -m755 -d "%{install-root}/etc/xml";
    fi
  - |
    if [ ! -e /etc/xml/catalog ]; then
      echo "Creating new xml catalog"
      xmlcatalog --noout --create "%{install-root}/etc/xml/catalog"
    else
      cp /etc/xml/catalog "%{install-root}/etc/xml/catalog"
    fi
  - |
    xmlcatalog --noout --add "rewriteSystem" \
          "http://docbook.sourceforge.net/release/xsl/1.78.1" \
          "/usr/share/xml/docbook/xsl-stylesheets-1.78.1" \
      "%{install-root}/etc/xml/catalog"
  - |
    xmlcatalog --noout --add "rewriteURI" \
          "http://docbook.sourceforge.net/release/xsl/1.78.1" \
          "/usr/share/xml/docbook/xsl-stylesheets-1.78.1" \
      "%{install-root}/etc/xml/catalog"
  - |
    xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "/usr/share/xml/docbook/xsl-stylesheets-1.78.1" \
      "%{install-root}/etc/xml/catalog"
  - |
    xmlcatalog --noout --add "rewriteURI" \
          "http://docbook.sourceforge.net/release/xsl/current" \
          "/usr/share/xml/docbook/xsl-stylesheets-1.78.1" \
      "%{install-root}/etc/xml/catalog"
