From aaa6bfa82aff074560881f381743811e2a0f309f Mon Sep 17 00:00:00 2001 From: Fahad Usman Date: Wed, 1 Sep 2010 01:54:55 +0000 Subject: docbook-sgml-dtd-native: converted to new style staging * Converted do_stage to do_install. * Moved the catalog files from ${sysconfdir}/sgml to ${D}${sysconfdir}/sgml so that they get included in the package file resulting with the new style staging. * Added a function docbook_sgml_dtd_native_mangle, to correct the path in .cat file and added it to SYSROOT_PREPROCESS_FUNCS. * Added INC_PR = "r1" to the .inc file and PR = "${INC_PR}.0" to the .bb files Signed-off-by: Fahad Usman Signed-off-by: Tom Rini --- .../docbook-sgml-dtd-3.1-native.bb | 2 ++ .../docbook-sgml-dtd-4.1-native.bb | 2 ++ .../docbook-sgml-dtd-4.4-native.bb | 2 ++ .../docbook-sgml-dtd-4.5-native.bb | 2 ++ .../docbook-sgml-dtd/docbook-sgml-dtd-native.inc | 27 ++++++++++++++++------ 5 files changed, 28 insertions(+), 7 deletions(-) (limited to 'recipes/docbook-sgml-dtd') diff --git a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native.bb b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native.bb index 939fd53ded..7f5e19edd2 100644 --- a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native.bb +++ b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native.bb @@ -2,6 +2,8 @@ require docbook-sgml-dtd-native.inc DTD_VERSION = "3.1" +PR = "${INC_PR}.0" + SRC_URI = "http://www.docbook.org/sgml/3.1/docbk31.zip;md5sum=432749c0c806dbae81c8bcb70da3b5d3" do_compile() { diff --git a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native.bb b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native.bb index 2bc43e1972..e6650edfe3 100644 --- a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native.bb +++ b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native.bb @@ -2,6 +2,8 @@ require docbook-sgml-dtd-native.inc DTD_VERSION = "4.1" +PR = "${INC_PR}.0" + SRC_URI = "http://docbook.org/sgml/4.1/docbk41.zip" do_compile() { diff --git a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.4-native.bb b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.4-native.bb index 9e5196438a..537e8b230b 100644 --- a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.4-native.bb +++ b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.4-native.bb @@ -2,6 +2,8 @@ require docbook-sgml-dtd-native.inc DTD_VERSION = "4.4" +PR = "${INC_PR}.0" + do_compile() { # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html # for details. diff --git a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb index f5e257ce17..82deb33401 100644 --- a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb +++ b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-4.5-native.bb @@ -2,6 +2,8 @@ require docbook-sgml-dtd-native.inc DTD_VERSION = "4.5" +PR = "${INC_PR}.0" + do_compile() { # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html # for details. diff --git a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-native.inc b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-native.inc index 69c9811d8a..15afd00860 100644 --- a/recipes/docbook-sgml-dtd/docbook-sgml-dtd-native.inc +++ b/recipes/docbook-sgml-dtd/docbook-sgml-dtd-native.inc @@ -12,20 +12,33 @@ SRC_URI = "http://www.docbook.org/sgml/${DTD_VERSION}/docbook-${DTD_VERSION}.zip S = "${WORKDIR}" +INC_PR = "r1" + +SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_native_mangle" + inherit native -do_stage () { +do_install () { # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html # for details. - install -d -m 755 ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION} - install docbook.cat ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog - cp -dpr *.dtd *.mod *.dcl ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION} - + install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION} + install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog + cp -dpr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION} + install-catalog --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \ - ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog - + ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog install-catalog --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \ ${sysconfdir}/sgml/sgml-docbook.cat + # Moving them to image directory so that they get included in the .ipk file + # generated by new style staging. + install -d ${D}${sysconfdir}/sgml + cp ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat ${D}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat + cp ${sysconfdir}/sgml/catalog ${D}${sysconfdir}/sgml/ } PACKAGES = "" +docbook_sgml_dtd_native_mangle () { + # Removing the image directory path (${D}) from the .cat file. + sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat +} +NATIVE_INSTALL_WORKS = "1" -- cgit 1.2.3-korg