bug 702302, bug 705137, enable l10n repacks for native UI, r=blassey,wesj
authorAxel Hecht <l10n@mozilla.com>
Tue, 06 Dec 2011 16:54:12 +0100
changeset 82851 f8c62105b2f9cd40e6ac5e89ef081e4d94df82a4
parent 82850 da08568cafa4b684eafa62e6a3723a38f55c07be
child 82852 c44c70188716ed91698f55077e2762b0aded2a6f
push id628
push userclegnitto@mozilla.com
push dateWed, 21 Dec 2011 14:41:57 +0000
treeherdermozilla-aurora@24a61ad789e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, wesj
bugs702302, 705137
milestone11.0a1
bug 702302, bug 705137, enable l10n repacks for native UI, r=blassey,wesj Fixing the l10n.ini and filter.py for both native and xul UI. Fixing the repack logic for native to support both single-locale repacks and multi-locale builds. Removing some deb packaging code, that's not of any use for android native.
mobile/android/Makefile.in
mobile/android/base/Makefile.in
mobile/android/base/locales/Makefile.in
mobile/android/base/locales/jar.mn
mobile/android/base/locales/l10n.ini
mobile/android/installer/Makefile.in
mobile/android/locales/Makefile.in
mobile/android/locales/filter.py
mobile/android/locales/l10n-central.ini
mobile/android/locales/l10n-mozilla-1.9.2.ini
mobile/android/locales/l10n-mozilla-2.0.ini
mobile/android/locales/l10n.ini
mobile/android/makefiles.sh
mobile/xul/locales/filter.py
mobile/xul/locales/l10n-central.ini
mobile/xul/locales/l10n-mozilla-1.9.2.ini
mobile/xul/locales/l10n-mozilla-2.0.ini
mobile/xul/locales/l10n.ini
toolkit/mozapps/installer/packager.mk
--- a/mobile/android/Makefile.in
+++ b/mobile/android/Makefile.in
@@ -38,17 +38,17 @@
 
 DEPTH      = ../..
 topsrcdir  = @top_srcdir@
 srcdir     = @srcdir@
 VPATH      = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = base chrome locales components modules themes/core app
+DIRS = locales base chrome components modules themes/core app
 
 ifndef LIBXUL_SDK
 PARALLEL_DIRS += $(DEPTH)/xulrunner/tools/redit
 endif
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/testing/testsuite-targets.mk
 
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -328,21 +328,16 @@ RES_DRAWABLE_XHDPI_V11 = \
 
 RES_COLOR = \
   res/color/awesomebar_tab_text.xml
 
 AB_rCD = $(shell echo $(AB_CD) | sed -e s/-/-r/)
 
 JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
 
-DEFAULT_BRANDPATH = $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/en-US/brand.dtd
-DEFAULT_STRINGSPATH = locales/en-US/android_strings.dtd
-LOCALIZED_BRANDPATH = $(DEPTH)/dist/bin/chrome/$(AB_CD)/locale/branding/brand.dtd
-LOCALIZED_STRINGSPATH = $(DEPTH)/dist/bin/chrome/android-res/res/values-$(AB_CD)/android_strings.dtd
-
 ifdef MOZ_CRASHREPORTER
 PROCESSEDJAVAFILES += CrashReporter.java
 MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/crash_reporter.png
 RES_LAYOUT += res/layout/crash_reporter.xml
 endif
 
 MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/address_bar_bg.xml              \
                          mobile/android/base/resources/drawable/address_bar_url_default.xml     \
@@ -388,20 +383,16 @@ MOZ_ANDROID_DRAWABLES += mobile/android/
                          mobile/android/base/resources/drawable/rounded_grey_box.xml            \
                          $(NULL)
 
 
 MOZ_ANDROID_DRAWABLES += $(shell if test -e $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn; then cat $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/android-resources.mn | tr '\n' ' ';  fi)
 
 include $(topsrcdir)/config/rules.mk
 
-ifneq ($(AB_CD),en-US)
-LOCALIZED_STRINGS_XML = res/values-$(AB_rCD)/strings.xml
-endif
-
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
 
 # Note that we're going to set up a dependency directly between embed_android.dex and the java files
 # Instead of on the .class files, since more than one .class file might be produced per .java file
 classes.dex: $(JAVAFILES) $(PROCESSEDJAVAFILES) R.java
 	$(NSINSTALL) -D classes
 	$(JAVAC) $(JAVAC_FLAGS) -Xlint:unchecked -Xlint:deprecation -d classes  $(addprefix $(srcdir)/,$(JAVAFILES)) $(PROCESSEDJAVAFILES) R.java
@@ -482,29 +473,11 @@ RES_DRAWABLE = $(addprefix res/drawable/
 	$(NSINSTALL) $^  res/color
 
 R.java: $(MOZ_APP_ICON) $(RES_LAYOUT) $(RES_LAYOUT_V11) $(RES_DRAWABLE) $(RES_VALUES) $(RES_VALUES_V11) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI_V8) $(RES_DRAWABLE_HDPI_V8) $(RES_DRAWABLE_MDPI_V9) $(RES_DRAWABLE_HDPI_V9) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_COLOR) res/drawable/icon.png res/drawable-hdpi/icon.png res/values/strings.xml AndroidManifest.xml
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -J . --custom-package org.mozilla.gecko
 
 gecko.ap_: AndroidManifest.xml res/drawable/icon.png res/drawable-hdpi/icon.png $(RES_LAYOUT) $(RES_LAYOUT_V11) $(RES_DRAWABLE) $(RES_VALUES) $(RES_VALUES_V11) $(RES_XML) $(RES_ANIM) $(RES_DRAWABLE_MDPI_V8) $(RES_DRAWABLE_HDPI_V8) $(RES_DRAWABLE_MDPI_V9) $(RES_DRAWABLE_HDPI_V9) $(RES_DRAWABLE_MDPI_V11) $(RES_DRAWABLE_HDPI_V11) $(RES_DRAWABLE_XHDPI_V11) $(RES_COLOR) res/values/strings.xml FORCE
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar  -S res -F $@
 
-res/values/strings.xml: $(DEFAULT_BRANDPATH) $(DEFAULT_STRINGSPATH) $(srcdir)/strings.xml.in
-	mkdir -p res/values
-	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
-	  -DBRANDPATH="$(DEFAULT_BRANDPATH)" \
-	  -DSTRINGSPATH="$(DEFAULT_STRINGSPATH)" \
-	  $(srcdir)/strings.xml.in \
-	  > $@
-
-res/values-$(AB_rCD)/strings.xml: $(LOCALIZED_BRANDPATH) $(LOCALIZED_STRINGSPATH) $(srcdir)/strings.xml.in
-	mkdir -p res/values-$(AB_rCD)
-	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
-	  -DBRANDPATH="$(call core_abspath,$(LOCALIZED_BRANDPATH))" \
-	  -DSTRINGSPATH="$(call core_abspath,$(LOCALIZED_STRINGSPATH))" \
-	  $(srcdir)/strings.xml.in \
-	  > $@
-
-chrome:: $(LOCALIZED_STRINGS_XML)
-
 libs:: classes.dex package-name.txt
 	$(INSTALL) classes.dex $(FINAL_TARGET)
 	$(INSTALL) package-name.txt $(FINAL_TARGET)
--- a/mobile/android/base/locales/Makefile.in
+++ b/mobile/android/base/locales/Makefile.in
@@ -38,11 +38,36 @@
 DEPTH     = ../../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = mobile/android/base/locales
 
 include $(DEPTH)/config/autoconf.mk
 
+# special case some locale codes, he and id
+# http://code.google.com/p/android/issues/detail?id=3639
+AB_rCD = $(if $(filter he, $(AB_CD)),iw,$(if $(filter id, $(AB_CD)),in,$(subst -,-r,$(AB_CD))))
+
+STRINGSPATH = $(call MERGE_FILE,android_strings.dtd)
+ifeq (,$(XPI_NAME))
+BRANDPATH = $(call core_abspath,$(DEPTH)/dist/bin/chrome/$(AB_CD)/locale/branding/brand.dtd)
+else
+BRANDPATH = $(call core_abspath,$(DIST)/xpi-stage/$(XPI_NAME)/chrome/$(AB_CD)/locale/branding/brand.dtd)
+endif
+
 DEFINES += -DAB_CD=$(AB_CD)
 
+libs realchrome:: ../res/values/strings.xml ;
+
+chrome-%:: AB_CD=$*
+chrome-%:: 
+	@$(MAKE) ../res/values-$(AB_rCD)/strings.xml AB_CD=$*
+
+%/strings.xml: FORCE
+	$(NSINSTALL) -D $*
+	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
+	  -DBRANDPATH="$(BRANDPATH)" \
+	  -DSTRINGSPATH="$(STRINGSPATH)" \
+	  $(srcdir)/../strings.xml.in \
+	  > $@
+
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/mobile/android/base/locales/jar.mn
+++ /dev/null
@@ -1,4 +0,0 @@
-#filter substitution
-
-android-res.jar:
-  res/values-@AB_CD@/android_strings.dtd    (%android_strings.dtd)
--- a/mobile/android/base/locales/l10n.ini
+++ b/mobile/android/base/locales/l10n.ini
@@ -1,5 +1,5 @@
 [general]
-depth = ../../..
+depth = ../../../..
 
 [compare]
 dirs = mobile/android/base
--- a/mobile/android/installer/Makefile.in
+++ b/mobile/android/installer/Makefile.in
@@ -104,154 +104,8 @@ ifdef MOZ_CHROME_MULTILOCALE
 	do \
 	  printf "$(BINPATH)/chrome/$$LOCALE$(JAREXT)\n" >> $@; \
 	  printf "$(BINPATH)/chrome/$$LOCALE.manifest\n" >> $@; \
 	done
 endif
 
 GARBAGE += $(MOZ_PKG_MANIFEST)
 endif
-
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-PACKAGE_XULRUNNER =
-UNPACKAGE =
-else
-PACKAGE_XULRUNNER = package-xulrunner
-UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX)
-endif
-
-ifdef LIBXUL_SDK
-MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)/xulrunner
-else
-MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)
-endif
-
-package-xulrunner:
-ifdef LIBXUL_SDK
-ifndef SYSTEM_LIBXUL
-	@echo "Packaging xulrunner..."
-	@rm -rf $(LIBXUL_DIST)/xulrunner*
-	@$(MAKE) -C $(LIBXUL_DIST)/.. package || echo "Perhaps you're trying to package a prebuilt SDK. See 'https://wiki.mozilla.org/Mobile/Build/Fennec#Build' for more information."
-	@cd $(DIST)/$(MOZ_PKG_DIR); $(UNMAKE_PACKAGE)
-	@echo "Removing unpackaged files... (the ones xulrunner/installer keeps)"
-	@cd $(DIST)/$(MOZ_PKG_DIR)/xulrunner; rm -rf $(NO_PKG_FILES)
-else
-	@echo "Using system xulrunner..."
-endif
-endif
-
-ifeq ($(OS_TARGET),Linux)
-GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
-GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
-ABS_OBJDIR=`cd $(DEPTH); pwd`
-ABS_TOPSRCDIR=$(shell cd $(topsrcdir); pwd)
-BASE64_ICON = dist/branding/fennec_maemo_icon26.txt
-MOZ_DEB_TIMESTAMP = "$(shell date  +"%a, %d  %b %Y %T %z" )"
-
-DEB_PKG_VERSION = $(shell echo $(MOZ_APP_VERSION) | $(PERL) -pe 's/pre/~$(GRE_BUILDID)/; s/^([0-9.]+)([a-z][0-9]+)/$$1~$$2/')
-
-DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-# package name should match mobile/installer/debian/changelog.in
-DEB_PKG_NAME = $(MOZ_PKG_APPNAME)_$(DEB_PKG_VERSION)_$(DEB_BUILD_ARCH).deb
-
-DEFINES += \
-	-DGRE_MILESTONE=$(GRE_MILESTONE) \
-	-DGRE_BUILDID=$(GRE_BUILDID) \
-	-Dinstalldir=$(installdir) \
-	-DMOZ_APP_DISPLAYNAME="$(MOZ_APP_DISPLAYNAME)" \
-	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-	-DABS_OBJDIR=$(ABS_OBJDIR) \
-	-DBASE64_ICON=$(BASE64_ICON) \
-	-DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP) \
-	-DDEB_PKG_VERSION=$(DEB_PKG_VERSION) \
-	$(NULL)
-
-DEBDESTDIR=debian/$(MOZ_APP_NAME)
-
-PP_DEB_FILES =	debian/control \
-		debian/changelog \
-		debian/$(MOZ_APP_NAME).desktop \
-		debian/$(MOZ_APP_NAME).links \
-		debian/$(MOZ_APP_NAME).service \
-		debian/compat \
-		debian/files \
-		debian/menu \
-		debian/fennec.preinst \
-		debian/fennec.prerm \
-		debian/fennec.postinst \
-		$(NULL)
-
-ifeq ($(MOZ_PLATFORM_MAEMO),6)
-PP_DEB_FILES += debian/fennec.aegis \
-		debian/backup \
-		debian/restore \
-		debian/fennec.conf \
-		debian/fennec-cud.sh \
-		debian/fennec-rfs.sh \
-		 debian/fennec.policy \
-                $(NULL)
-endif
-
-$(PP_DEB_FILES):
-	@$(EXIT_ON_ERROR) \
-	for f in $(PP_DEB_FILES); do \
-           src=$(srcdir)/debian/`basename $$f`.in; \
-	   echo $$src ">" $$f ;\
-           $(RM) -f $$f; \
-           mkdir -p debian;  \
-           $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
-             $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $$src > $$f; \
-         done
-
-deb: $(PP_DEB_FILES) $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png \
-	$(DIST)/branding/$(MOZ_APP_NAME)_26x26.png \
-	$(DIST)/branding/$(MOZ_APP_NAME)_40x40.png
-	rm -rf $(DEBDESTDIR)/$(installdir)/*
-	$(NSINSTALL) -D $(DEBDESTDIR)/$(installdir)
-	cp -pRL $(DIST)/$(MOZ_APP_NAME)/* $(DEBDESTDIR)/$(installdir)
-ifeq ($(MOZ_PLATFORM_MAEMO),6)
-	$(NSINSTALL)  debian/$(MOZ_APP_NAME).desktop $(DEBDESTDIR)/usr/share/applications/
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
-	cp debian/$(MOZ_APP_NAME).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_APP_NAME).service
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/themes/blanco/meegotouch/icons/
-	cp $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png $(DEBDESTDIR)/usr/share/themes/blanco/meegotouch/icons/$(MOZ_APP_NAME).png
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/backup-framework/applications
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/$(MOZ_APP_NAME)
-	$(NSINSTALL) -D $(DEBDESTDIR)/etc/osso-cud-scripts
-	$(NSINSTALL) -D $(DEBDESTDIR)/etc/osso-rfs-scripts
-	$(NSINSTALL) -m 755 debian/backup  $(DEBDESTDIR)/usr/share/$(MOZ_APP_NAME)/
-	$(NSINSTALL) -m 755 debian/restore $(DEBDESTDIR)/usr/share/$(MOZ_APP_NAME)/
-	cp debian/$(MOZ_APP_NAME).conf $(DEBDESTDIR)/usr/share/backup-framework/applications/$(MOZ_APP_NAME).conf
-	cp debian/$(MOZ_APP_NAME)-cud.sh $(DEBDESTDIR)/etc/osso-cud-scripts/$(MOZ_APP_NAME)-cud.sh
-	cp debian/$(MOZ_APP_NAME)-rfs.sh $(DEBDESTDIR)/etc/osso-rfs-scripts/$(MOZ_APP_NAME)-rfs.sh
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/policy/etc/syspart.conf.d
-	cp debian/$(MOZ_APP_NAME).policy $(DEBDESTDIR)/usr/share/policy/etc/syspart.conf.d/$(MOZ_APP_NAME)
-else
-	$(NSINSTALL)  debian/$(MOZ_APP_NAME).desktop $(DEBDESTDIR)/usr/share/applications/hildon/
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
-	cp debian/$(MOZ_APP_NAME).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_APP_NAME).service
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/
-	cp $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/$(MOZ_APP_NAME).png
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/
-	cp $(DIST)/branding/$(MOZ_APP_NAME)_26x26.png $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/$(MOZ_APP_NAME).png
-	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/
-	cp $(DIST)/branding/$(MOZ_APP_NAME)_40x40.png $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/$(MOZ_APP_NAME).png
-endif
-	fakeroot dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; fakeroot dh_builddeb;
-
-# a defined CONTENTMANAGER implicitly means MOZ_PLATFORM_MAEMO is equals 6
-# in case you use CONTENTMANGER you need to sign your package to gain tracker access.
-ifeq ($(MOZ_PLATFORM_MAEMO),6)
-	if test -e "/usr/bin/aegis-deb-add"; then \
-	   fakeroot aegis-deb-add -control $(DEBDESTDIR)/DEBIAN/control .. debian/fennec.aegis=_aegis; \
-	else \
-	   echo aegis-builder not found, security signing failed!; \
-	fi
-endif
-
-	echo $(DEB_PKG_NAME) > $(DIST)/deb_name.txt
-
-installer: deb
-	@echo Installer DEB created!
-
-# relative to $(DIST)
-UPLOAD_EXTRA_FILES += ../mobile/$(DEB_PKG_NAME) deb_name.txt
-endif
--- a/mobile/android/locales/Makefile.in
+++ b/mobile/android/locales/Makefile.in
@@ -96,48 +96,58 @@ GARBAGE += tmp-search.jar.mn
 
 include $(topsrcdir)/config/rules.mk
 
 include $(topsrcdir)/toolkit/locales/l10n.mk
 
 clobber-zip:
 	$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
 	  $(STAGEDIST)/chrome/$(AB_CD).manifest \
-	  $(STAGEDIST)/defaults/preferences/mobile-l10n.js
+	  $(STAGEDIST)/defaults/pref/mobile-l10n.js
 	$(RM) -r $(STAGEDIST)/dictionaries \
 	  $(STAGEDIST)/hyphenation \
 	  $(STAGEDIST)/defaults/profile \
 	  $(STAGEDIST)/chrome/$(AB_CD)
 
+# need to kill stage for repacks for now due to the library moves
+# in PACKAGE and UNPACKAGE
+# also clean up potential left-overs of multi-locale builds, notably
+# values-*/strings.xml. Those would be in the way of a single locale build,
+# which this target is for
+clobber-stage:
+	$(RM) -rf $(STAGEDIST)
+	$(RM) $(DEPTH)/mobile/android/base/res/values-*/strings.xml
+
 libs-%:
 	$(NSINSTALL) -D $(DIST)/install
-	@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
-	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
-	@$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+	@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$* BOTH_MANIFESTS=1
+	@$(MAKE) -C $(DEPTH)/services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+	@$(MAKE) -C $(DEPTH)/intl/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) -B bookmarks.json AB_CD=$*
 	@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
-	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/preferences BOTH_MANIFESTS=1
+	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+	@$(MAKE) -C $(DEPTH)/mobile/android/base/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 
 # Tailored target to just add the chrome processing for multi-locale builds
 chrome-%:
 	@$(MAKE) -C $(DEPTH)/toolkit/locales chrome-$*
 	@$(MAKE) -C $(DEPTH)/services/sync/locales chrome AB_CD=$*
 	@$(MAKE) -B bookmarks.json AB_CD=$*
 	@$(MAKE) -B searchplugins AB_CD=$*
 	@$(MAKE) chrome AB_CD=$*
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$*
 ifeq ($(OS_TARGET),Android)
-	@$(MAKE) -C $(DEPTH)/mobile/android/base chrome AB_CD=$*
+	@$(MAKE) -C $(DEPTH)/mobile/android/base/locales chrome-$*
 endif
 
 # This is a generic target that will make a langpack and repack tarball
 # builds. It is called from the tinderbox scripts. Alter it with caution.
 
-installers-%: clobber-% langpack-% repackage-zip-%
+installers-%: clobber-stage repackage-zip-%
 	@echo "repackaging done"
 
 NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
 
 bookmarks.json: bookmarks.inc generic/profile/bookmarks.json.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	  -I $< \
 	  -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
@@ -187,63 +197,14 @@ endif
 ident:
 	@printf "gecko_revision "
 	@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(GECKO_PLATFORM_INI_PATH) Build SourceStamp
 	@printf "fennec_revision "
 	@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(FENNEC_APPLICATION_INI_PATH) App SourceStamp
 	@printf "buildid "
 	@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(FENNEC_APPLICATION_INI_PATH) App BuildID
 
-# special targets just to do the debian single locale packages
-wget-DEB_PKG_NAME:
-ifndef WGET
-	$(error Wget not installed)
-endif
-ifndef EN_US_BINARY_URL
-	$(error EN_US_BINARY_URL not defined)
-endif
-	@$(WGET) -q -O - $(EN_US_BINARY_URL)/deb_name.txt
-
-wget-deb:
-ifndef WGET
-	$(error Wget not installed)
-endif
-ifndef EN_US_BINARY_URL
-	$(error EN_US_BINARY_URL not defined)
-endif
-ifndef DEB_PKG_NAME
-	$(error DEB_PKG_NAME not defined)
-endif
-	$(WGET) -nv -N  $(EN_US_BINARY_URL)/$(DEB_PKG_NAME)
-
-$(DATASTAGE): $(DEB_PKG_NAME)
-	$(RM) -rf $(DATASTAGE)
-	$(NSINSTALL) -D $(DATASTAGE)/DEBIAN
-	ar -p $(DEB_PKG_NAME) data.tar.gz | $(TAR) -zx -C $(DATASTAGE)
-	$(MAKE) clobber-zip AB_CD=en-US STAGEDIST=$(DATASTAGE)/$(installdir)
-	ar -p $(DEB_PKG_NAME) control.tar.gz | $(TAR) -zx -C $(DATASTAGE)/DEBIAN
-# XXX hack around multi-locale deb right now
-	$(RM) $(DATASTAGE)/$(installdir)/chrome/??.*
-	$(RM) $(DATASTAGE)/$(installdir)/chrome/??-??.*
-
-repackage-deb: $(DATASTAGE)
-	$(RM) -rf $(AB_CD)
-	$(NSINSTALL) -D $(AB_CD)/tmp
-	cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
-	  $(TAR) --exclude=install.rdf --exclude=chrome.manifest --exclude=crashreporter.app $(TAR_CREATE_FLAGS) - * | ( cd $(DATASTAGE)/$(installdir) && $(TAR) -xf - )
-	cd $(DATASTAGE) && $(TAR) $(TAR_CREATE_FLAGS) - * | (cd $(CURDIR)/$(AB_CD)/tmp && $(TAR) -xf - )
-	$(MAKE) clobber-zip STAGEDIST=$(DATASTAGE)/$(installdir)
-	cd $(AB_CD) && dpkg-deb -b tmp $(DEB_PKG_NAME)
-	$(RM) -rf $(AB_CD)/tmp
-
-deb-%: AB_CD=$*
-deb-%: clobber-% langpack-%
-ifndef DEB_PKG_NAME
-	$(error DEB_PKG_NAME not defined)
-endif
-	@$(MAKE) repackage-deb AB_CD=$(AB_CD) DEB_PKG_NAME=$(DEB_PKG_NAME)
-
 merge-%:
 ifdef LOCALE_MERGEDIR
 	$(RM) -rf $(LOCALE_MERGEDIR)
 	MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
 endif
 	@echo
--- a/mobile/android/locales/filter.py
+++ b/mobile/android/locales/filter.py
@@ -36,25 +36,20 @@
 # ***** END LICENSE BLOCK *****
 
 
 def test(mod, path, entity = None):
   import re
   # ignore anything but mobile, which is our local repo checkout name
   if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                  "services/sync", "mobile/android/base",
-                 "mobile"):
+                 "mobile/android"):
     return False
 
-  # Ignore Lorentz strings, at least temporarily
-  if mod == "toolkit" and path == "chrome/mozapps/plugins/plugins.dtd":
-    if entity.startswith('reloadPlugin.'): return False
-    if entity.startswith('report.'): return False
-
-  if mod != "mobile":
+  if mod != "mobile/android":
     # we only have exceptions for mobile
     return True
   if not entity:
     return not (re.match(r"searchplugins\/.+\.xml", path) or
                 re.match(r"mobile-l10n.js", path) or
                 re.match(r"defines.inc", path))
   if path == "defines.inc":
     return entity != "MOZ_LANGPACK_CONTRIBUTORS"
deleted file mode 100644
--- a/mobile/android/locales/l10n-central.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-+[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile/android
-tld = mobile/android
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-services_sync = services/sync/locales/l10n.ini
-embedding_android = mobile/android/base/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
-
-[include_services_sync]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = services/sync/locales/l10n.ini
-
-[include_embedding_android]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = mobile/android/base/locales/l10n.ini
deleted file mode 100644
--- a/mobile/android/locales/l10n-mozilla-1.9.2.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile/android
-tld = mobile/android
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = releases/mozilla-1.9.2
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
deleted file mode 100644
--- a/mobile/android/locales/l10n-mozilla-2.0.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile/android
-tld = mobile/android
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-services_sync = services/sync/locales/l10n.ini
-embedding_android = mobile/android/base/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
-
-[include_services_sync]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = services/sync/locales/l10n.ini
-
-[include_embedding_android]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = mobile/android/base/locales/l10n.ini
--- a/mobile/android/locales/l10n.ini
+++ b/mobile/android/locales/l10n.ini
@@ -1,11 +1,11 @@
 [general]
-depth = ../..
+depth = ../../..
 all = mobile/android/locales/all-locales
 
 [compare]
 dirs = mobile/android
 
 [includes]
 toolkit = toolkit/locales/l10n.ini
 services_sync = services/sync/locales/l10n.ini
-embedding_android = mobile/android/base/locales/l10n.ini
+android_base = mobile/android/base/locales/l10n.ini
--- a/mobile/android/makefiles.sh
+++ b/mobile/android/makefiles.sh
@@ -37,16 +37,18 @@
 
 add_makefiles "
 netwerk/locales/Makefile
 dom/locales/Makefile
 toolkit/locales/Makefile
 security/manager/locales/Makefile
 mobile/android/app/Makefile
 mobile/android/app/profile/extensions/Makefile
+mobile/android/base/Makefile
+mobile/android/base/locales/Makefile
 $MOZ_BRANDING_DIRECTORY/Makefile
 $MOZ_BRANDING_DIRECTORY/locales/Makefile
 mobile/android/chrome/Makefile
 mobile/android/chrome/tests/Makefile
 mobile/android/components/Makefile
 mobile/android/components/build/Makefile
 mobile/android/modules/Makefile
 mobile/android/installer/Makefile
--- a/mobile/xul/locales/filter.py
+++ b/mobile/xul/locales/filter.py
@@ -36,25 +36,20 @@
 # ***** END LICENSE BLOCK *****
 
 
 def test(mod, path, entity = None):
   import re
   # ignore anything but mobile, which is our local repo checkout name
   if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                  "services/sync", "embedding/android",
-                 "mobile"):
+                 "mobile/xul"):
     return False
 
-  # Ignore Lorentz strings, at least temporarily
-  if mod == "toolkit" and path == "chrome/mozapps/plugins/plugins.dtd":
-    if entity.startswith('reloadPlugin.'): return False
-    if entity.startswith('report.'): return False
-
-  if mod != "mobile":
+  if mod != "mobile/xul":
     # we only have exceptions for mobile
     return True
   if not entity:
     return not (re.match(r"searchplugins\/.+\.xml", path) or
                 re.match(r"mobile-l10n.js", path) or
                 re.match(r"defines.inc", path))
   if path == "defines.inc":
     return entity != "MOZ_LANGPACK_CONTRIBUTORS"
deleted file mode 100644
--- a/mobile/xul/locales/l10n-central.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile
-tld = mobile
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-services_sync = services/sync/locales/l10n.ini
-embedding_android = embedding/android/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
-
-[include_services_sync]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = services/sync/locales/l10n.ini
-
-[include_embedding_android]
-type = hg
-mozilla = mozilla-central
-repo = http://hg.mozilla.org/
-l10n.ini = embedding/android/locales/l10n.ini
deleted file mode 100644
--- a/mobile/xul/locales/l10n-mozilla-1.9.2.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile
-tld = mobile
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = releases/mozilla-1.9.2
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
deleted file mode 100644
--- a/mobile/xul/locales/l10n-mozilla-2.0.ini
+++ /dev/null
@@ -1,31 +0,0 @@
-[general]
-depth = ../..
-source-depth = ..
-all = locales/all-locales
-
-[compare]
-dirs = mobile
-tld = mobile
-
-[includes]
-toolkit = toolkit/locales/l10n.ini
-services_sync = services/sync/locales/l10n.ini
-embedding_android = embedding/android/locales/l10n.ini
-
-[include_toolkit]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = toolkit/locales/l10n.ini
-
-[include_services_sync]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = services/sync/locales/l10n.ini
-
-[include_embedding_android]
-type = hg
-mozilla = releases/mozilla-2.0
-repo = http://hg.mozilla.org/
-l10n.ini = embedding/android/locales/l10n.ini
--- a/mobile/xul/locales/l10n.ini
+++ b/mobile/xul/locales/l10n.ini
@@ -1,11 +1,11 @@
 [general]
-depth = ../..
+depth = ../../..
 all = mobile/xul/locales/all-locales
 
 [compare]
-dirs = mobile
+dirs = mobile/xul
 
 [includes]
 toolkit = toolkit/locales/l10n.ini
 services_sync = services/sync/locales/l10n.ini
 embedding_android = embedding/android/locales/l10n.ini
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -317,19 +317,19 @@ else
 ifdef MOZ_THUMB2
 ABI_DIR = armeabi-v7a
 else
 ABI_DIR = armeabi
 endif
 endif
 
 ifeq ($(MOZ_BUILD_APP),mobile/xul)
-GECKO_APP_AP_PATH = ../embedding/android
+GECKO_APP_AP_PATH = $(call core_abspath,$(DEPTH)/embedding/android)
 else
-GECKO_APP_AP_PATH = ../mobile/android/base
+GECKO_APP_AP_PATH = $(call core_abspath,$(DEPTH)/mobile/android/base)
 endif
 
 PKG_SUFFIX      = .apk
 INNER_MAKE_PACKAGE	= \
   make -C $(GECKO_APP_AP_PATH) gecko.ap_ && \
   cp $(GECKO_APP_AP_PATH)/gecko.ap_ $(_ABS_DIST) && \
   ( cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && \
     mkdir -p lib/$(ABI_DIR) && \
@@ -346,18 +346,19 @@ INNER_MAKE_PACKAGE	= \
   $(APKBUILDER) $(_ABS_DIST)/gecko.apk -v $(APKBUILDER_FLAGS) -z $(_ABS_DIST)/gecko.ap_ -f $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/classes.dex && \
   cp $(_ABS_DIST)/gecko.apk $(_ABS_DIST)/gecko-unsigned-unaligned.apk && \
   $(JARSIGNER) $(_ABS_DIST)/gecko.apk && \
   $(ZIPALIGN) -f -v 4 $(_ABS_DIST)/gecko.apk $(PACKAGE)
 INNER_UNMAKE_PACKAGE	= \
   mkdir $(MOZ_PKG_DIR) && \
   cd $(MOZ_PKG_DIR) && \
   $(UNZIP) $(UNPACKAGE) && \
-  mv lib/$(ABI_DIR)/*.so . && \
-  rm -rf lib
+  mv lib/$(ABI_DIR)/libmozutils.so . && \
+  mv lib/$(ABI_DIR)/*plugin-container* $(MOZ_CHILD_PROCESS_NAME) && \
+  rm -rf lib/$(ABI_DIR)
 endif
 ifeq ($(MOZ_PKG_FORMAT),DMG)
 ifndef _APPNAME
 ifdef MOZ_DEBUG
 _APPNAME	= $(MOZ_APP_DISPLAYNAME)Debug.app
 else
 _APPNAME	= $(MOZ_APP_DISPLAYNAME).app
 endif