diff --git a/rules b/rules
index 3aacd39..206075a 100755
--- a/rules
+++ b/rules
@@ -3476,13 +3227,16 @@ $(call get_orig_tarball,-%):
 	$(call pack_gittarball,$*,$@,libreoffice-$(DEB_VERSION_UPSTREAM)/)
 
 # Get upstream external sources
-$(call get_orig_tarball,-external): helpcontent2/makefile.pmk translations/makefile.mk .gitignore
+$(call get_orig_tarball,-src): helpcontent2/makefile.pmk translations/makefile.mk .gitignore
 	dh_testdir
-	rm -rf $(TARFIILE_LOCATION)
-	mkdir -p $(TARFILE_LOCATION)
-	./autogen.sh --with-all-tarballs
-	$(MAKE) download
-	tar cvJf $@ -C external --transform 's,./,,' .
+	rm -rf src
+	mkdir -p src
+	./autogen.sh $(filter-out --disable-fetch-external,$(CONFIGURE_FLAGS)) --with-all-tarballs
+	$(MAKE) download gb_LO_VER=$(DEB_VERSION_UPSTREAM)
+	# removing the biggest internal tarballs to keep the source tree size
+	# reasonable -- we likely never want to use those internal anyway
+	rm $(foreach tarball,*-boost_* *-JLanguageTool-* *-cairo-* *-icu4c-* *-postgresql-* Python-* *-dbghelp.dll *cros* *source*font* *deja* *gentium*font* *liberation* *Libertine* *open-sans-font* *pt-serif-font*,src/$(tarball))
+	tar cvJf $@ -C src --transform 's,./,,' .
 
 # using flag files for unpacking
 .gitignore: $(call get_orig_tarball)
@@ -3494,22 +3248,60 @@ translations/makefile.mk:  $(call get_orig_tarball,-translations)
 helpcontent2/makefile.pmk:  $(call get_orig_tarball,-helpcontent2)
 	$(call unpack_gittarball,helpcontent2,$<,)
 
-external/tarballs/fetch.log: $(call get_orig_tarball,-external) patched
-	$(call unpack_gittarball,external,$<,)
+src/fetch.log: $(call get_orig_tarball,-src) patched
+	$(call unpack_gittarball,src,$<,)
 
-get-orig-source: $(call get_orig_tarball,-external) external/tarballs/fetch.log
+get-orig-source: $(call get_orig_tarball,-src) src/fetch.log
 	dh_testdir
 
-unpack: external/fetch.log
+unpack: src/fetch.log
 	dh_testdir
 endif
 endif
 
+COMMA:=,
+APOSTROPHE:='
+QUOTE:="
+define sed-escape
+$(subst $(QUOTE),\x22,$(subst $(APOSTROPHE),\x27,$(subst $(COMMA),\x2c,$(1))))
+endef
+
+update-l10n:
+	dh_testdir
+	sed -e 's,@BUILD_DEPS@,$(call sed-escape,$(BUILD_DEPS)),' \
+	    -e 's,@BUILD_DEPS_INDEP@,$(call sed-escape,$(BUILD_DEPS_INDEP)),' \
+	    -e 's,@CONFIGURE_FLAGS@,$(call sed-escape,$(filter-out --enable-mergelibs --with-branding%,$(CONFIGURE_FLAGS))),' \
+	    -e 's,@CONFIGURE_FLAGS_LANG@,$(call sed-escape,$(CONFIGURE_FLAGS_LANG)),' \
+	    -e 's,@LANGPACKISOS@,$(call sed-escape,$(LANGPACKISOS)),' \
+	    -e 's,@ISOS@,$(call sed-escape,$(ISOS)),' \
+	    -e 's,@HELPISOS@,$(call sed-escape,$(HELPISOS)),' \
+	    -e 's,@JAVA_MAINVER@,$(call sed-escape,$(JAVA_MAINVER)),' \
+	    < debian/debian-l10n/config.in > debian/debian-l10n/config
+	sed -e 's,@BUILD_DEPS@,$(call sed-escape,$(BUILD_DEPS)),' \
+	    -e 's,@BUILD_DEPS_INDEP@,$(call sed-escape,$(BUILD_DEPS_INDEP)),' \
+	    < debian/debian-l10n/control.in > debian/debian-l10n/control
+	sed -e 's,^libreoffice,libreoffice-l10n,' \
+	    < debian/changelog > debian/debian-l10n/changelog
+	$(foreach LANGPACKISO,$(filter-out en-US ca-valencia,$(LANGPACKISOS)),\
+		./debian/scripts/create-l10n-control \
+			$(LANGPACKISO) \
+			< debian/debian-l10n/control.lang.in \
+			>> debian/debian-l10n/control;)
+	$(foreach HELPISO,$(filter-out ca-valencia,$(HELPISOS)),\
+		./debian/scripts/create-l10n-control \
+			$(HELPISO) \
+			< debian/debian-l10n/control.help.in \
+			>> debian/debian-l10n/control;)
+	$(foreach debdir,patches source templates,\
+        cp -a ./debian/$(debdir) ./debian/debian-l10n/$(debdir) && ) true
+	$(foreach debfile,compat copyright,\
+        mkdir -p $(dir ./debian/debian-l10n/$(debfile)) && \
+        cp -a ./debian/$(debfile) ./debian/debian-l10n/$(debfile) && ) true
 
 .PHONY: control
 .PHONY: clean-debdir clean-instsetoo clean-objectdirs clean default
 .PHONY: prepare build build-indep build-arch install-arch install-indep
-.PHONY: get-orig-source unpack patched
+.PHONY: get-orig-source unpack patched l10n-config
 .PHONY: $(stampdir_targets)
 
 # vim:set noet ai sts=8 sw=8 tw=0:
