Bug 1395363 - Switch to webextension-langpacks. r?pike
MozReview-Commit-ID: HFT0v0yWVVC
deleted file mode 100644
--- a/toolkit/locales/generic/install.rdf
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#filter substitution
-#include @TK_DEFINES@
-#include @APP_DEFINES@
--->
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- <Description about="urn:mozilla:install-manifest"
- em:id="@MOZ_LANGPACK_EID@"
- em:name="@MOZ_LANG_TITLE@ Language Pack"
- em:version="@MOZ_APP_VERSION@"
- em:type="8"
- em:creator="@MOZ_LANGPACK_CREATOR@">
-#ifdef MOZ_LANGPACK_CONTRIBUTORS
- @MOZ_LANGPACK_CONTRIBUTORS@
-#endif
-
- <em:targetApplication>
- <Description>
- <em:id>@MOZ_APP_ID@</em:id>
- <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
- <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
- </Description>
- </em:targetApplication>
- </Description>
-</RDF>
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -160,24 +160,27 @@ endif
endif
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f '$(DIST)/l10n-stage/$(PACKAGE)' '$(ZIP_OUT)'
if test -f '$(DIST)/l10n-stage/$(PACKAGE).asc'; then mv -f '$(DIST)/l10n-stage/$(PACKAGE).asc' '$(ZIP_OUT).asc'; fi
repackage-zip-%: unpack
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN='$(ZIP_IN)'
-APP_DEFINES = $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \
- $(srcdir)/en-US/defines.inc)
-NEW_APP_DEFINES = $(TK_DEFINES) $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \
- $(srcdir)/en-US/defines.inc)
-TK_DEFINES = $(firstword \
- $(wildcard $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc) \
- $(MOZILLA_DIR)/toolkit/locales/en-US/defines.inc)
+ifdef IS_LANGUAGE_REPACK
+MERGE_TK_FILE = $(firstword \
+ $(wildcard $(REAL_LOCALE_MERGEDIR)/$(subst /locales,,toolkit/locales)/$(1)) \
+ $(wildcard $(LOCALE_SRCDIR)/$(1)) \
+ $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/$(1) )
+else
+MERGE_TK_FILE = $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/$(1)
+endif
+
+LANGPACK_DEFINES = $(call MERGE_TK_FILE,defines.inc) $(call MERGE_DIR,defines.inc)
# Dealing with app sub dirs: If DIST_SUBDIRS is defined it contains a
# listing of app sub-dirs we should include in langpack xpis. If not,
# check DIST_SUBDIR, and if that isn't present, just package the default
# chrome directory.
PKG_ZIP_DIRS = chrome $(or $(DIST_SUBDIRS),$(DIST_SUBDIR))
# Clone a l10n repository, either via hg or git
@@ -210,27 +213,17 @@ endif
langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%: IS_LANGUAGE_REPACK=1
langpack-%: IS_LANGPACK=1
langpack-%: libs-%
@echo 'Making langpack $(LANGPACK_FILE)'
$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
- $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \
- -DTK_DEFINES=$(TK_DEFINES) -DAPP_DEFINES=$(APP_DEFINES) $(MOZILLA_DIR)/toolkit/locales/generic/install.rdf -o $(DIST)/xpi-stage/$(XPI_NAME)/install.rdf)
- $(call py_action,zip,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.js $(LANGPACK_FILE) install.rdf $(PKG_ZIP_DIRS) chrome.manifest)
-
-langpack-webext-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
-langpack-webext-%: AB_CD=$*
-langpack-webext-%: XPI_NAME=locale-$*
-langpack-webext-%: libs-%
- @echo 'Making new-langpack $(LANGPACK_FILE)'
- $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
- $(call py_action,langpack_manifest,--locales $(AB_CD) --min-app-ver $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name "$(MOZ_APP_DISPLAYNAME)" --l10n-basedir "$(L10NBASEDIR)" --defines $(NEW_APP_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD))
+ $(call py_action,langpack_manifest,--locales $(AB_CD) --min-app-ver $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name "$(MOZ_APP_DISPLAYNAME)" --l10n-basedir "$(L10NBASEDIR)" --defines $(LANGPACK_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD))
$(call py_action,zip,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.manifest -x **/*.js -x **/*.ini $(LANGPACK_FILE) $(PKG_ZIP_DIRS) manifest.json)
# This variable is to allow the wget-en-US target to know which ftp server to download from
ifndef EN_US_BINARY_URL
EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
endif
# In taskcluster the installer comes from another location
ifndef EN_US_INSTALLER_BINARY_URL