1*eb8dc403SDave CobbleySUMMARY = "XSL stylesheets for processing DocBook XML to various output formats"
2*eb8dc403SDave CobbleyHOMEPAGE = "http://docbook.sourceforge.net"
3*eb8dc403SDave CobbleyLICENSE = "XSL"
4*eb8dc403SDave CobbleyLIC_FILES_CHKSUM = "file://COPYING;md5=6beadd98f9c54ab0c387e14211ee4d0e"
5*eb8dc403SDave Cobbley
6*eb8dc403SDave CobbleySRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
7*eb8dc403SDave Cobbley           file://docbook-xsl.xml \
8*eb8dc403SDave Cobbley           file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
9*eb8dc403SDave Cobbley"
10*eb8dc403SDave Cobbley
11*eb8dc403SDave CobbleySRC_URI[md5sum] = "b48cbf929a2ad85e6672f710777ca7bc"
12*eb8dc403SDave CobbleySRC_URI[sha256sum] = "725f452e12b296956e8bfb876ccece71eeecdd14b94f667f3ed9091761a4a968"
13*eb8dc403SDave Cobbley
14*eb8dc403SDave CobbleyUPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/"
15*eb8dc403SDave Cobbley# Reject versions ending in .0 as those are release candidates
16*eb8dc403SDave CobbleyUPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
17*eb8dc403SDave Cobbley
18*eb8dc403SDave CobbleyS = "${WORKDIR}/docbook-xsl-${PV}"
19*eb8dc403SDave Cobbley
20*eb8dc403SDave Cobbleyinherit allarch
21*eb8dc403SDave CobbleyBBCLASSEXTEND = "native"
22*eb8dc403SDave Cobbley
23*eb8dc403SDave Cobbleydo_configure (){
24*eb8dc403SDave Cobbley	:
25*eb8dc403SDave Cobbley}
26*eb8dc403SDave Cobbley
27*eb8dc403SDave Cobbleydo_compile (){
28*eb8dc403SDave Cobbley	:
29*eb8dc403SDave Cobbley}
30*eb8dc403SDave Cobbley
31*eb8dc403SDave Cobbleydo_install () {
32*eb8dc403SDave Cobbley	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
33*eb8dc403SDave Cobbley	# for details.
34*eb8dc403SDave Cobbley	install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
35*eb8dc403SDave Cobbley	ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
36*eb8dc403SDave Cobbley
37*eb8dc403SDave Cobbley	cp -v -R VERSION assembly common eclipse epub epub3 fo \
38*eb8dc403SDave Cobbley		highlighting html htmlhelp images javahelp lib manpages \
39*eb8dc403SDave Cobbley		params profiling roundtrip slides template webhelp website \
40*eb8dc403SDave Cobbley		xhtml xhtml-1_1 xhtml5 catalog.xml \
41*eb8dc403SDave Cobbley		${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
42*eb8dc403SDave Cobbley
43*eb8dc403SDave Cobbley	ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-${PV}/VERSION.xsl
44*eb8dc403SDave Cobbley
45*eb8dc403SDave Cobbley	install -v -m644 -D README \
46*eb8dc403SDave Cobbley		${D}${datadir}/doc/docbook-xsl-${PV}/README.txt
47*eb8dc403SDave Cobbley	install -v -m644    RELEASE-NOTES* NEWS* \
48*eb8dc403SDave Cobbley		${D}${datadir}/doc/docbook-xsl-${PV}
49*eb8dc403SDave Cobbley
50*eb8dc403SDave Cobbley	install -d ${D}${sysconfdir}/xml/
51*eb8dc403SDave Cobbley	install -m 755  ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
52*eb8dc403SDave Cobbley
53*eb8dc403SDave Cobbley}
54*eb8dc403SDave Cobbley
55*eb8dc403SDave Cobbleydo_install_append_class-native () {
56*eb8dc403SDave Cobbley	# Ensure that the catalog file sgml-docbook.cat is properly
57*eb8dc403SDave Cobbley	# updated when the package is installed from sstate cache.
58*eb8dc403SDave Cobbley	sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${D}${sysconfdir}/xml/docbook-xsl.xml
59*eb8dc403SDave Cobbley}
60*eb8dc403SDave Cobbley
61*eb8dc403SDave CobbleyRDEPENDS_${PN} += "perl"
62*eb8dc403SDave CobbleyFILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
63*eb8dc403SDave CobbleyFILES_${PN}-doc = "${datadir}/doc/*"
64