File: rules

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

include /usr/share/dpkg/pkg-info.mk

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

#DEBIAN_VERSION = $(shell (dpkg-parsechangelog -l$(PKD)/changelog | grep Version | sed 's/Version..//' | sed 's/-.\+//'))
DEBIAN_VERSION = $(shell (echo $(DEB_VERSION_UPSTREAM) | sed 's/\+dfsg1//'))
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