File: rules

package info (click to toggle)
golang-github-rfjakob-eme 1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 96 kB
  • ctags: 34
  • sloc: makefile: 12; sh: 3
file content (17 lines) | stat: -rwxr-xr-x 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/make -f

PKD = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
PKG = $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)

DEBIAN_VERSION = $(shell (dpkg-parsechangelog -l$(PKD)/changelog | grep Version | sed 's/Version..//' | sed 's/-.\+//'))
PRODUCT_VERSION = $(shell (grep "version=" setup.py | sed "s/.\+'\(.\+\)'.\+/\1/"))
VER ?= $(DEBIAN_VERSION)

%:
	dh $@ --buildsystem=golang --with=golang

.PHONY get-orig-source:
get-orig-source:  $(info I: $(PKG)_$(VER))
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
	rm -f $(PKG)-$(VER).tar.gz.pgp