File: rules

package info (click to toggle)
golang-goleveldb 0%2Bgit20160825.6ae1797-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 860 kB
  • ctags: 1,684
  • sloc: makefile: 14
file content (23 lines) | stat: -rwxr-xr-x 786 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
20
21
22
23
#!/usr/bin/make -f

export DH_VERBOSE=1

# Exclude test code from compilation and installation.
export DH_GOLANG_EXCLUDES := manualtest leveldb/testutil

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

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

override_dh_auto_test:
	# Give tests more time to run, as they fail on busy machines.
	dh_auto_test -- -timeout 20m

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