Patchwork [17/17] firefox-l10n-pt-br: update to 3.6.8 and sync with O.S. Systems tree

login
register
mail settings
Submitter Otavio Salvador
Date May 30, 2011, 2:54 p.m.
Message ID <1306767263-29895-18-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/5071/
State New, archived
Headers show

Comments

Otavio Salvador - May 30, 2011, 2:54 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb |    9 --------
 recipes/mozilla/firefox-l10n-pt-br_3.6.8.bb |    9 ++++++++
 recipes/mozilla/firefox-l10n.inc            |   29 +++++++++++++--------------
 3 files changed, 23 insertions(+), 24 deletions(-)
 delete mode 100644 recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb
 create mode 100644 recipes/mozilla/firefox-l10n-pt-br_3.6.8.bb

Patch

diff --git a/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb b/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb
deleted file mode 100644
index e354f05..0000000
--- a/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@ 
-# Copyright (C) 2009, O.S. Systems Software Ltda. All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-require firefox-l10n.inc
-
-PR = "${INC_PR}.1"
-
-SRC_URI[md5sum] = "29c672886aa9ca41428ba04196938545"
-SRC_URI[sha256sum] = "1474828a58f893bed20f0e0cd26bc310c7472d69bf7a1ae01c00a371de256b1a"
diff --git a/recipes/mozilla/firefox-l10n-pt-br_3.6.8.bb b/recipes/mozilla/firefox-l10n-pt-br_3.6.8.bb
new file mode 100644
index 0000000..7151bb8
--- /dev/null
+++ b/recipes/mozilla/firefox-l10n-pt-br_3.6.8.bb
@@ -0,0 +1,9 @@ 
+# Copyright (C) 2009, 2011, O.S. Systems Software Ltda. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+require firefox-l10n.inc
+
+PR = "${INC_PR}.1"
+
+SRC_URI[md5sum] = "fa333ab8c9c108f9714827d517191d0a"
+SRC_URI[sha256sum] = "759dccbe0ce21abe1ecb6b76fccb777c23422370a8aec2b5cccf25745ab0cb9b"
diff --git a/recipes/mozilla/firefox-l10n.inc b/recipes/mozilla/firefox-l10n.inc
index 4ab8873..57b90f6 100644
--- a/recipes/mozilla/firefox-l10n.inc
+++ b/recipes/mozilla/firefox-l10n.inc
@@ -1,10 +1,9 @@ 
-# Copyright (C) 2009, O.S. Systems Software Ltda. All Rights Reserved
+# Copyright (C) 2009, 2011, O.S. Systems Software Ltda. All Rights Reserved
 # Released under the MIT license (see packages/COPYING)
 
 def get_language_name(package):
     lang = package.replace('firefox-l10n-', '')
-
-    if lang.find('-'):
+    if lang.find('-') != -1:
         lang = lang.split('-')
         lang[1] = lang[1].upper()
         lang = '-'.join(lang)
@@ -12,35 +11,35 @@  def get_language_name(package):
     return lang
 
 DEPENDS = "unzip-native"
-RDEPENDS_${PN} = "firefox"
+RDEPENDS = "firefox"
 LANGUAGE = "${@get_language_name('${PN}')}"
+FIREFOX_PV = "${PV}"
+INC_PR = "r3"
 
 SRC_URI = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/linux-i686/xpi/${LANGUAGE}.xpi"
 S = "${WORKDIR}"
 
 do_configure() {
-	unzip -o -q -d ${LANGUAGE} ${LANGUAGE}.xpi
+	unzip -o -q -d ${LANGUAGE} *.xpi
 }
 
-INC_PR = "r2"
-
 do_install() {
 	cd ${S}/${LANGUAGE}
 
 	# Get extension UUID
-	EXTENSION=`cat install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`
+	EXTENSION=`cat install.rdf | sed --posix '/em:id[=>]/!d;s/[[:space:]]*<*em:id[=>]"*//;s/["<].*//' | head -n 1`
 
-	mkdir -p ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}/chrome
-	mkdir -p ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}/uninstall
-	install -m 644 chrome/*.jar ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}/chrome
-	install -m 644 install.rdf ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}
-	install -m 644 chrome.manifest ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}
+	mkdir -p ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}/chrome
+	mkdir -p ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}/uninstall
+	cp -R chrome ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}/
+	install -m 644 install.rdf ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}
+	install -m 644 chrome.manifest ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}
 
 	cat install.rdf \
 	   | sed --posix '/<em:locale>/!d' \
 	   | sed --posix "s/.*/register      global  locale  ${LANGUAGE}/" \
-	   > ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}/uninstall/Uninstall
+	   > ${D}/usr/lib/firefox-${FIREFOX_PV}/extensions/${EXTENSION}/uninstall/Uninstall
 }
 
-FILES_${PN} += "/usr/lib/firefox-${PV}"
+FILES_${PN} += "/usr/lib/firefox-${FIREFOX_PV}"
 PACKAGE_ARCH = "all"