Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # Enable hardening build flags
8 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
9
10 # Don't link with as-needed to prevent missing libraries
11 export DEB_LDFLAGS_MAINT_APPEND=-Wl,--no-as-needed
12
13 ifeq (,$(DEB_HOST_MULTIARCH))
14 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
15 endif
16
17 PKGNAME=$(shell grep Package: debian/control | head -1 | cut -d' ' -f2)
18 GRASS=grass$(subst .,,$(shell pkg-config --modversion grass | cut -d. -f1,2))
19 GRASS_ABI=grass$(subst .,,$(shell pkg-config --modversion grass | cut -d. -f1,2,3 | sed -e 's/RC/-/'))
20
21 %:
22 dh $@ --buildsystem cmake
23
24 override_dh_auto_configure:
25 dh_auto_configure -- \
26 -DAUTOLOAD_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/gdalplugins \
27 -DBUILD_TESTING=OFF
28
29 override_dh_shlibdeps:
30 dh_shlibdeps -l.:/usr/lib/$(GRASS)/lib
31
32 override_dh_gencontrol:
33 dh_gencontrol -- -Vgrass:Depends="$(GRASS_ABI)"