#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk PKD = $(word 1,$(abspath $(dir $(MAKEFILE_LIST)))) PKG = $(DEB_SOURCE) UVER = $(shell echo $(DEB_VERSION) | cut -d "-" -f1) DTYPE = VER ?= $(subst $(DTYPE),,$(UVER)) PLUGINS = $(shell ls debian/watch.* | cut -d "." -f2 | sed -e 's/fusiondirectory-//') %: dh $@ override_dh_installchangelogs: dh_installchangelogs -k core/Changelog get-orig-source: $(patsubst %,$(PKG)-%_$(VER)$(DTYPE).orig.tar.gz,$(PLUGINS)) cd $(PKD) && XZ_OPT=-6v tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.gz" --owner=root --group=root --mode=a+rX README.multi-orig-tarball-package cd $(PKD)/.. && mv *.tar.gz .. $(PKG)-%_$(VER)$(DTYPE).orig.tar.gz: cd $(PKD)/.. @echo "# Downloading..." uscan --noconf --force-download --package $(PKG)-$* --watchfile debian/watch.fusiondirectory-$* --upstream-version $(UVER) --download-version $(VER) --rename --destdir=. @echo "# Renaming..." mv -v $(PKG)-$*_$(VER).orig.tar.gz $(PKG)_$(VER)$(DTYPE).orig-$*.tar.gz if test "$*" = "core"; then mv -v $(PKG)-$(UVER).tar.gz.pgp ../$(PKG)_${VER}${DTYPE}.orig-$*.tar.gz.asc; fi if test "$*" != "core"; then mv -v $(PKG)-$*-$(UVER).tar.gz.pgp ../$(PKG)_${VER}${DTYPE}.orig-$*.tar.gz.asc; fi