File: rules

package info (click to toggle)
lsof 4.99.4%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: ansic: 50,680; sh: 8,351; makefile: 1,194; perl: 940; awk: 214
file content (50 lines) | stat: -rwxr-xr-x 1,438 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
42
43
44
45
46
47
48
49
50
#!/usr/bin/make -f

export DH_VERBOSE=1
ifeq ($(shell uname -s),GNU/kFreeBSD)
    PLATFORM:=freebsd
else
    PLATFORM:=linux
endif

# This has to be exported to make some magic below work.
export DH_OPTIONS

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# this is used by ./Configure
LSOF_CFGF := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export LSOF_CFGF
LSOF_CFGL := $(shell dpkg-buildflags --get LDFLAGS)
export LSOF_CFGL
# prevent recording of details of the build environment to ensure build
# reproducibility
LSOF_CCDATE := none
LSOF_HOST := none
LSOF_LOGNAME := none
LSOF_SYSINFO := none
LSOF_USER := none
export LSOF_CCDATE LSOF_HOST LSOF_LOGNAME LSOF_SYSINFO LSOF_USER

DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
    export LSOF_CC := $(DEB_HOST_GNU_TYPE)-gcc
    export LSOF_CCV := $(shell $(LSOF_CC) -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p')
    export LINUX_CONF_CC := gcc
    export LSOF_AR := $(DEB_HOST_GNU_TYPE)-ar cr
    export LSOF_RANLIB := $(DEB_HOST_GNU_TYPE)-ranlib
    # Autodetection will fail.
    LSOF_CFGF += -DHAS_STRFTIME
endif

override_dh_installchangelogs:
	dh_installchangelogs 00DIST

#override_dh_auto_test:
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#	cd tests && make test && make opt && cd -
#endif

%:
	dh $@