# Template file for 'docbook-xsl'
pkgname=docbook-xsl
# keep in sync with docbook-xsl-ns
version=1.79.2
revision=2
# at v1.79.2, docbook-xsl was renamed to docbook-xsl-nons
wrksrc="${pkgname}-nons-${version}"
depends="xmlcatmgr docbook-xml>=4.2"
short_desc="Docbook XSL modular stylesheet"
maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="MIT"
homepage="https://docbook.org/"
distfiles="https://github.com/docbook/xslt10-stylesheets/releases/download/release/${version}/${wrksrc}.tar.bz2"
checksum=ee8b9eca0b7a8f89075832a2da7534bce8c5478fc8fc2676f512d5d87d832102
xml_entries="nextCatalog /usr/share/xsl/docbook/catalog.xml --"

do_install() {
	local xslmods="assembly common eclipse epub epub3 fo highlighting html \
		htmlhelp images javahelp lib manpages params profiling \
		roundtrip template slides website xhtml xhtml-1_1 xhtml5"

	vinstall catalog.xml 644 usr/share/xsl/docbook
	vinstall VERSION 644 usr/share/xsl/docbook
	vinstall VERSION.xsl 644 usr/share/xsl/docbook

	for dir in ${xslmods}; do
		vmkdir usr/share/xsl/docbook/${dir}
		cp -a ${dir}/* ${DESTDIR}/usr/share/xsl/docbook/${dir}/
	done

	vlicense COPYING
}
