#!/usr/bin/make -f PACKAGE = yagf DEBIAN_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) USCAN_REPORT = $(shell uscan --noconf --report --dehs $(DEBIAN_PATH)) CUR_VER = $(shell echo "$(USCAN_REPORT)" | sed -n 's/.*\(.*\)<\/upstream-version>.*/\1/p') CUR_URL = $(shell echo "$(USCAN_REPORT)" | sed -n 's/.*\(.*\)<\/upstream-url>.*/\1/p') LDFLAGS += -Wl,--as-needed %: dh $@ --parallel get-orig-source: wget -c "$(CUR_URL)" -O "$(PACKAGE)_$(CUR_VER).orig.tar.gz"