Package: mozilla-thunderbird
Version: 1.0.6-3
Severity: wishlist
Tags: patch

This patch automates the downloading and dfsg cleaning of the original upstream 
source package. I've verified that it produces an archive with the same
contents than that which ships in unstable now. It seems that the
bzip2 optimization is wrong though, since the files don't match.

The makefile dependencies could be better (i.e. get-orig-source
provides dfsg source and build depends on dfsg source etc).

-Mikko
--- rules-original      2005-08-07 10:20:13.000000000 +0300
+++ rules       2005-08-07 20:16:49.000000000 +0300
@@ -14,9 +14,10 @@
 export MOZ_THUNDERBIRD=1
 export PACKAGE=mozilla-thunderbird
 
+VERSION:=1.0.6
 MAKE_OPTS=-C build-dir/mozilla
 
-TBIRD_BZ2_ARCHIVE=thunderbird-1.0.6-source.dfsg.tar.bz2
+TBIRD_BZ2_ARCHIVE=thunderbird-$(VERSION)-source.dfsg.tar.bz2
 
 
 # These are used for cross-compiling and for saving the configure script
@@ -67,6 +68,20 @@
 
 # --enable-strip 
 
+get-orig-source:
+       pwd=`pwd` && \
+       tmp=`mktemp -d /tmp/mozilla-thunderbird.XXXXXX` && \
+       cd $$tmp && \
+       wget -q 
ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$(VERSION)/source/thunderbird-$(VERSION)-source.tar.bz2
 && \
+       tar --exclude "other-licenses/branding*" \
+           --exclude "other-licenses/7zstub*" \
+           -jxf $$tmp/thunderbird-$(VERSION)-source.tar.bz2 && \
+       tar -cjf $(TBIRD_BZ2_ARCHIVE) mozilla && \
+       cp $$tmp/$(TBIRD_BZ2_ARCHIVE) \
+          $$pwd/archives/$(TBIRD_BZ2_ARCHIVE) && \
+       cd $$pwd && \
+       rm -rf $$tmp
+
 build-dir/mozilla/config.status: build-dir/mozilla/configure
        dh_testdir
        rm -f build-dir/mozilla/.mozconfig
@@ -230,4 +245,4 @@
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+.PHONY: build clean binary-indep binary-arch binary install get-orig-source

Reply via email to