File: rules

package info (click to toggle)
openssh-ssh1 1%3A7.5p1-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 10,728 kB
  • sloc: ansic: 98,313; sh: 10,775; makefile: 1,072; awk: 341; perl: 53; csh: 1
file content (94 lines) | stat: -rwxr-xr-x 2,337 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

include /usr/share/dpkg/default.mk

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

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

ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  PARALLEL :=
else
  PARALLEL := \
	-j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
  CC := gcc
  PKG_CONFIG = pkg-config
else
  CC := $(DEB_HOST_GNU_TYPE)-gcc
  PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
endif

# Change the version string to reflect distribution
SSH_EXTRAVERSION := $(DEB_VENDOR)-$(shell echo '$(DEB_VERSION)' | sed -e 's/.*-//')

# Common path configuration.
confflags += --sysconfdir=/etc/ssh
confflags += --libexecdir=\$${prefix}/lib/openssh

# Common build options.
confflags += --disable-strip
confflags += --with-mantype=doc
confflags += --with-4in6

# The Hurd needs libcrypt for res_query et al.
ifeq ($(DEB_HOST_ARCH_OS),hurd)
confflags += --with-libs=-lcrypt
endif

# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
ifeq ($(DEB_HOST_ARCH),hppa)
confflags += --without-hardening
endif

confflags += --with-ssl-engine
ifeq ($(DEB_HOST_ARCH_OS),linux)
confflags += --with-selinux
endif

confflags += --with-xauth=/usr/bin/xauth

# Compiler flags.
cflags := $(CPPFLAGS) $(CFLAGS)
cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
confflags += --with-cflags='$(cflags)'

# Linker flags.
confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'

%:
	dh $@ --with=autoreconf

autoreconf:
	autoreconf -f -i
	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./

override_dh_autoreconf:
	dh_autoreconf debian/rules -- autoreconf

override_dh_auto_configure:
	dh_auto_configure -Bdebian/build-deb-ssh1 -- $(confflags) --with-ssh1

override_dh_auto_build:
	$(MAKE) -C debian/build-deb-ssh1 $(PARALLEL) SSH_PROGRAM='/usr/bin/ssh1' ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp ssh-keygen ssh.1.out scp.1.out ssh-keygen.1.out

override_dh_auto_test:

override_dh_auto_clean:
	rm -rf debian/build-deb-ssh1

override_dh_auto_install:

override_dh_install:
	dh_install --fail-missing

# Tighten libssl dependencies to match the check in entropy.c.
override_dh_shlibdeps:
	dh_shlibdeps
	debian/adjust-openssl-dependencies