diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 44004d8c15e0..fd343607aa2c 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -204,7 +204,7 @@ upload: checksum source-package: @echo 'Packaging source tarball...' $(MKDIR) -p $(DIST)/$(PKG_SRCPACK_PATH) - (cd $(MOZ_PKG_SRCDIR) && $(CREATE_SOURCE_TAR) - $(DIR_TO_BE_PACKAGED)) | xz -9e > $(SOURCE_TAR) + (cd $(MOZ_PKG_SRCDIR) && $(CREATE_SOURCE_TAR) - ./ ) | xz -9e > $(SOURCE_TAR) hg-bundle: $(MKDIR) -p $(DIST)/$(PKG_SRCPACK_PATH) diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index 8a6cd7a76319..96913dfc5d47 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -775,7 +775,7 @@ ifndef MOZ_PKG_SRCDIR MOZ_PKG_SRCDIR = $(topsrcdir) endif -DIR_TO_BE_PACKAGED ?= ../$(notdir $(topsrcdir)) +SRC_TAR_PREFIX = $(MOZ_APP_NAME)-$(MOZ_PKG_VERSION) SRC_TAR_EXCLUDE_PATHS += \ --exclude='.hg*' \ --exclude='CVS' \ @@ -788,7 +788,7 @@ ifdef MOZ_OBJDIR SRC_TAR_EXCLUDE_PATHS += --exclude='$(MOZ_OBJDIR)' endif CREATE_SOURCE_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \ - --mode=go-w $(SRC_TAR_EXCLUDE_PATHS) -f + --mode=go-w $(SRC_TAR_EXCLUDE_PATHS) --transform='s,^\./,$(SRC_TAR_PREFIX)/,' -f SOURCE_TAR = $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_SRCPACK_BASENAME).tar.xz HG_BUNDLE_FILE = $(DIST)/$(PKG_SRCPACK_PATH)$(PKG_BUNDLE_BASENAME).bundle