Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "XSL stylesheets for processing DocBook XML to various output formats" |
| 2 | HOMEPAGE = "http://docbook.sourceforge.net" |
| 3 | LICENSE = "XSL" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6eeeed43d498c22a835382533356462" |
| 5 | |
| 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \ |
| 7 | file://docbook-xsl.xml \ |
| 8 | file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \ |
| 9 | " |
| 10 | |
| 11 | SRC_URI[md5sum] = "6dd0f89131cc35bf4f2ed105a1c17771" |
| 12 | SRC_URI[sha256sum] = "c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467" |
| 13 | |
| 14 | S = "${WORKDIR}/docbook-xsl-${PV}" |
| 15 | |
| 16 | inherit allarch |
| 17 | BBCLASSEXTEND = "native" |
| 18 | |
| 19 | SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xsl_stylesheets_sstate_postinst" |
| 20 | SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xsl_stylesheets_sysroot_preprocess" |
| 21 | |
| 22 | do_configure (){ |
| 23 | : |
| 24 | } |
| 25 | |
| 26 | do_compile (){ |
| 27 | : |
| 28 | } |
| 29 | |
| 30 | do_install () { |
| 31 | # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html |
| 32 | # for details. |
| 33 | install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1 |
| 34 | |
| 35 | cp -v -R VERSION common eclipse epub extensions fo highlighting html \ |
| 36 | htmlhelp images javahelp lib manpages params profiling \ |
| 37 | roundtrip slides template tests tools webhelp website \ |
| 38 | xhtml xhtml-1_1 catalog.xml \ |
| 39 | ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1 |
| 40 | |
| 41 | ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl |
| 42 | |
| 43 | install -v -m644 -D README \ |
| 44 | ${D}${datadir}/doc/docbook-xsl-1.78.1/README.txt |
| 45 | install -v -m644 RELEASE-NOTES* NEWS* \ |
| 46 | ${D}${datadir}/doc/docbook-xsl-1.78.1 |
| 47 | |
| 48 | install -d ${D}${sysconfdir}/xml/ |
| 49 | install -m 755 ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml |
| 50 | |
| 51 | } |
| 52 | |
| 53 | docbook_xsl_stylesheets_sstate_postinst () { |
| 54 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] |
| 55 | then |
| 56 | # Ensure that the catalog file sgml-docbook.cat is properly |
| 57 | # updated when the package is installed from sstate cache. |
| 58 | sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml |
| 59 | fi |
| 60 | } |
| 61 | |
| 62 | docbook_xsl_stylesheets_sysroot_preprocess () { |
| 63 | # Update the hardcode dir in docbook-xml.xml |
| 64 | sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml |
| 65 | } |
| 66 | |
| 67 | RDEPENDS_${PN} += "perl" |
| 68 | FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml" |
| 69 | FILES_${PN}-doc = "${datadir}/doc/*" |