File: rules

package info (click to toggle)
golang-x-text 0.0~git20161013.0.c745997-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,868 kB
  • ctags: 6,073
  • sloc: makefile: 28
file content (28 lines) | stat: -rwxr-xr-x 982 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
22
23
24
25
26
27
28
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export DH_GOPKG := golang.org/x/text
export DH_GOLANG_EXCLUDES := golang.org/x/text/collate/tools/colcmp

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

BUILDDIR := $(shell perl -w -MDebian::Debhelper::Buildsystem::golang -e \
    'print Debian::Debhelper::Buildsystem::golang->new()->get_builddir()')

override_dh_auto_configure:
	dh_auto_configure -O--buildsystem=golang
	# Include test fixtures.
	cp -av encoding/testdata $(BUILDDIR)/src/$(DH_GOPKG)/encoding/


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