File: rules

package info (click to toggle)
geoip 1.6.9-4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,044 kB
  • ctags: 702
  • sloc: ansic: 17,024; cpp: 1,528; perl: 200; makefile: 97; sh: 27; awk: 13
file content (30 lines) | stat: -rwxr-xr-x 1,129 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 DEB_BUILD_OPTIONS+=nocheck
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk
ifeq ($(origin CXX),default)
	CXX = $(DEB_HOST_GNU_TYPE)-g++
endif
DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2)

%:
	dh $@ --with autoreconf

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	# Build the build script.
	$(CXX) $(CPPFLAGS) -std=gnu++98 $(LDFLAGS) -g debian/src/geoip-csv-to-dat.cpp -o debian/tmp/geoip-generator -lGeoIP \
		-I $(CURDIR)/debian/tmp/usr/include/ -L $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	$(CXX) $(CPPFLAGS) -std=gnu++98 $(LDFLAGS) -g debian/src/geoip-asn-csv-to-dat.cpp -o debian/tmp/geoip-generator-asn -lGeoIP \
		-I $(CURDIR)/debian/tmp/usr/include/ -L $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	chrpath -d -k debian/tmp/usr/bin/geoip*

override_dh_install:
	dh_install
	strip --remove-section=.comment \
		$(CURDIR)/debian/libgeoip-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libGeoIP.a

override_dh_strip:
	dh_strip --dbg-package=geoip-dbg