File: rules

package info (click to toggle)
keyutils 1.5.9-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,144 kB
  • ctags: 631
  • sloc: sh: 3,095; ansic: 2,947; makefile: 237
file content (41 lines) | stat: -rwxr-xr-x 1,209 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
35
36
37
38
39
40
41
#!/usr/bin/make -f

# $SOURCE_DATE_EPOCH is exported by debhelper
CHANGEDATE = $(shell date -d @$(SOURCE_DATE_EPOCH) +%F)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_VERSION := $(shell dpkg-parsechangelog -S Version)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)


%:
	dh ${@}

override_dh_auto_build:
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	dh_auto_build -- BUILDDATE=$(CHANGEDATE) CC=$(DEB_HOST_GNU_TYPE)-gcc AR=$(DEB_HOST_GNU_TYPE)-ar
else
	dh_auto_build -- BUILDDATE=$(CHANGEDATE)
endif

override_dh_auto_install:
	dh_auto_install -- LIBDIR=/lib/$(DEB_HOST_MULTIARCH) USRLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_test:
	# Use  the library and executable we just built;
	# skip tests requiring root
	dh_auto_test -- \
		PATH=$(CURDIR):$(PATH) \
		LD_LIBRARY_PATH=$(CURDIR) \
		SKIPROOT=yes \
		SKIPINSTALLED=yes

override_dh_install:
	dh_install --fail-missing

override_dh_strip:
	dh_strip --dbgsym-migration='keyutils-dbg (<< $(DEB_VERSION)~)'