[oe-commits] Fahad Usman : docbook-sgml-dtd-native: converted to new style staging
git version control
git at git.openembedded.org
Thu Sep 30 21:04:08 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: aaa6bfa82aff074560881f381743811e2a0f309f
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=aaa6bfa82aff074560881f381743811e2a0f309f
Author: Fahad Usman <fahad_usman at mentor.com>
Date: Wed Sep 1 01:54:55 2010 +0000
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 <fahad_usman at mentor.com>
Signed-off-by: Tom Rini <tom_rini at mentor.com>
---
.../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(-)
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 939fd53..7f5e19e 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 2bc43e1..e6650ed 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 9e51964..537e8b2 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 f5e257c..82deb33 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 69c9811..15afd00 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"
More information about the Openembedded-commits
mailing list