SUMMARY="XSL stylesheets for DocBook XML document instances"
DESCRIPTION="
DocBook is an XML vocabulary that lets you create documents in a \
presentation-neutral form that captures the logical structure of your content. \
Using free tools along with the DocBook XSL stylesheets, you can publish your \
content as HTML pages and PDF files, and in many other formats.
"

HOMEPAGE="http://docbook.sourceforge.net"
SOURCE_URI="http://sourceforge.net/projects/docbook/files/docbook-xsl/1.78.1/docbook-xsl-1.78.1.tar.bz2"
CHECKSUM_SHA256="c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467"

REVISION="1"
ARCHITECTURES="any"

LICENSE="BSD (3-clause)"
COPYRIGHT="
	1999-2007 Norman Walsh
	2003 Jiří Kosek
	2004-2007 Steve Ball
	2005-2008 The DocBook Project
	2011-2012 O'Reilly Media
	"

PROVIDES="
	docbook_xsl_stylesheets = $portVersion
	"
BUILD_PREREQUIRES="
	cmd:xmlcatalog
	cmd:find
	"

SOURCE_DIR="docbook-xsl-$portVersion"

BUILD()
{
	true
}

INSTALL()
{
	mkdir -p $dataDir/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 $dataDir/xml/docbook/xsl-stylesheets-1.78.1

	ln -s VERSION $dataDir/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl

	mkdir -p $dataDir/xml/catalog

	CATALOG=$dataDir/xml/catalog/docbook-xsl
	xmlcatalog --noout --create $CATALOG

	xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/1.78.1" \
           "$dataDir/xml/docbook/xsl-stylesheets-1.78.1" \
    $CATALOG

	xmlcatalog --noout --add "rewriteURI" \
           "http://docbook.sourceforge.net/release/xsl/1.78.1" \
           "$dataDir/xml/docbook/xsl-stylesheets-1.78.1" \
    $CATALOG

	xmlcatalog --noout --add "rewriteSystem" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "$dataDir/xml/docbook/xsl-stylesheets-1.78.1" \
    $CATALOG

	xmlcatalog --noout --add "rewriteURI" \
           "http://docbook.sourceforge.net/release/xsl/current" \
           "$dataDir/xml/docbook/xsl-stylesheets-1.78.1" \
    $CATALOG
}

