File: rules

package info (click to toggle)
golang-check.v1 0.0%2Bgit20161208.0.20d25e2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 276 kB
  • ctags: 482
  • sloc: makefile: 14
file content (19 lines) | stat: -rwxr-xr-x 699 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/make -f

export DH_OPTIONS
export DH_GOPKG := gopkg.in/check.v1

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

DEBVERS    ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
VERSION    ?= $(shell echo '$(DEBVERS)' | sed 's/^[[:digit:]]*://; s/[-].*//')
DEBPKGNAME ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Source: //p')
GITCOMMIT  ?= $(shell echo '$(VERSION)' | \
              sed -e 's/.*+git[[:digit:]]*\.\([[:xdigit:]]*\).*/\1/')

gen-orig-tgz:
	if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.gz ] ; then \
            git archive --format=tar.gz --prefix=$(DEBPKGNAME)-$(VERSION)/ \
                $(GITCOMMIT) >../$(DEBPKGNAME)_$(VERSION).orig.tar.gz ; \
        fi