File: rules

package info (click to toggle)
golang-github-abh-geoip-dev 0.0~git20150611-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 112 kB
  • ctags: 79
  • sloc: perl: 25; makefile: 16
file content (34 lines) | stat: -rwxr-xr-x 1,207 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
31
32
33
34
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DH_OPTIONS

export DH_GOPKG := github.com/abh/geoip/

# main packaging script based on dh7 syntax
%:
	dh $@ --buildsystem=golang --with=golang

override_dh_auto_test:
	ln -s $(CURDIR)/test-db obj-$(DEB_HOST_GNU_TYPE)/src/github.com/abh/geoip/test-db
	dh_auto_test -O--buildsystem=golang

override_dh_auto_install:
	dh_auto_install -O--buildsystem=golang
	# remove the demo binary
	rm -r $(CURDIR)/debian/golang-github-abh-geoip-dev/usr/bin
	# remove the demo sources
	rm -r $(CURDIR)/debian/golang-github-abh-geoip-dev/usr/share/gocode/src/github.com/abh/geoip/ex
	# remove the broken test-db symlink
	rm $(CURDIR)/debian/golang-github-abh-geoip-dev/usr/share/gocode/src/github.com/abh/geoip/test-db
	# remove the geoip_test.go
	rm $(CURDIR)/debian/golang-github-abh-geoip-dev/usr/share/gocode/src/github.com/abh/geoip/geoip_test.go