diff --git a/debian/rules b/debian/rules index 16d0d2ef4..9f19875f6 100755 --- a/debian/rules +++ b/debian/rules @@ -38,15 +38,19 @@ $(BUILD_DIR) $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ DIR_ORIG = ../orig/$(SOURCE)-$(VERSION) -TAR_ORIG = ../$(SOURCE)_$(VERSION).orig.tar.gz +TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz +TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . $(DIR_ORIG): - @[ -e $(TAR_ORIG) ] || ( echo "Can't find orig tarball" >&2; exit 1 ) +ifeq ($(TAR_ORIG),) + $(error Cannot find orig tarball $(TAR_ORIG_NAME)) +else mkdir -p ../orig tar -C ../orig -xzf $(TAR_ORIG) +endif maintainerclean: rm -f debian/control debian/control.md5sum debian/rules.gen debian/bin/patch.* debian/linux-*