File: rules

package info (click to toggle)
golang-golang-x-oauth2 0.0~git20161103.0.36bc617-4~bpo8%2B2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 396 kB
  • sloc: makefile: 17
file content (30 lines) | stat: -rwxr-xr-x 979 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
29
30
#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := google/testdata
# Avoid running google package tests, that pull a circular dependency.
#export DH_GOLANG_EXCLUDES := google

BUILDDIR = $(CURDIR)/build
MAIN_PKG = golang-golang-x-oauth2-dev
GOOG_PKG = golang-golang-x-oauth2-google-dev
GOOG_DIR = /usr/share/gocode/src/golang.org/x/oauth2/google

%:
	dh $@ --buildsystem=golang --with=golang --builddir=$(BUILDDIR)

override_dh_auto_configure:
	dh_auto_configure
	# Embed google-cloud-metadata files to avoid circular dependencies.
	cp -va debian/cloud/ $(BUILDDIR)/src/golang.org/x/oauth2/

override_dh_auto_install:
	dh_auto_install
	# Move golang.org/x/oauth2/google to a separate package.
	mkdir -v -p `dirname debian/$(GOOG_PKG)$(GOOG_DIR)`
	mv -v debian/tmp/$(GOOG_DIR) debian/$(GOOG_PKG)$(GOOG_DIR)
	# Install the rest in the main package.
	dh_install usr/share/gocode

override_dh_installdocs:
	# Just symlink the documentation.
	dh_installdocs --link-doc=$(MAIN_PKG)