File: rules

package info (click to toggle)
golang-github-docker-spdystream 0.0~git20151103.0.4d80814-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 224 kB
  • sloc: makefile: 18
file content (29 lines) | stat: -rwxr-xr-x 1,060 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DH_GOPKG := github.com/docker/spdystream

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

override_dh_auto_test:
	-dh_auto_test

## http://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER  ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | perl -ne 'print $$1 if m{^(?:\d+:)?(\d.*)(?:\-\d+.*)};')
REV   = $(shell sh -c 'printf "$${1\#\#*.0.}"' -- "$(VER)")

get-orig-source: $(PKG)_$(VER).orig.tar.gz $(info I: $(PKG)_$(VER))
	@

$(PKG)_$(VER).orig.tar.gz:
	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
	@echo "# Downloading..."
	wget --tries=3 --timeout=40 --read-timeout=40 --continue -O $@ \
          https://$(DH_GOPKG)/archive/$(REV).tar.gz \
        || uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-current-version $(PKD)