File: rules

package info (click to toggle)
golang-github-golang-snappy 0.0%2Bgit20160529.d9eb7a3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 272 kB
  • sloc: asm: 587; cpp: 59; makefile: 11
file content (16 lines) | stat: -rwxr-xr-x 579 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA = testdata

%:
	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')

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