summaryrefslogtreecommitdiff
path: root/recipes/mozilla
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2009-03-20 17:31:17 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2009-04-03 17:14:04 -0300
commitcdd5eb0d3184bdda83ec4e0cad7f04dc1005afbe (patch)
tree698df0ac349e5b90538f5eebb4fb4be370046ced /recipes/mozilla
parent0b9cb309ce90b4f0394859625365ca948fe25812 (diff)
firefox-l10n-pt-br: add
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes/mozilla')
-rw-r--r--recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb6
-rw-r--r--recipes/mozilla/firefox-l10n.inc46
2 files changed, 52 insertions, 0 deletions
diff --git a/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb b/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb
new file mode 100644
index 0000000000..a79c96dc00
--- /dev/null
+++ b/recipes/mozilla/firefox-l10n-pt-br_3.0.4.bb
@@ -0,0 +1,6 @@
+# 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"
diff --git a/recipes/mozilla/firefox-l10n.inc b/recipes/mozilla/firefox-l10n.inc
new file mode 100644
index 0000000000..31555e3d0d
--- /dev/null
+++ b/recipes/mozilla/firefox-l10n.inc
@@ -0,0 +1,46 @@
+# Copyright (C) 2009, 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('-'):
+ lang = lang.split('-')
+ lang[1] = lang[1].upper()
+ lang = '-'.join(lang)
+
+ return lang
+
+DEPENDS = "unzip-native"
+RDEPENDS = "firefox"
+LANGUAGE = "${@get_language_name('${PN}')}"
+
+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
+}
+
+INC_PR = "r1"
+
+do_install() {
+ cd ${S}/${LANGUAGE}
+
+ # Get extension UUID
+ EXTENSION=`cat install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`
+
+ 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}
+
+ cat install.rdf \
+ | sed --posix '/<em:locale>/!d' \
+ | sed --posix "s/.*/register global locale ${LANGUAGE}/" \
+ > ${D}/usr/lib/firefox-${PV}/extensions/${EXTENSION}/uninstall/Uninstall
+}
+
+FILES_${PN} += "/usr/lib/firefox-${PV}"
+PACKAGE_ARCH = "all"