File: rules

package info (click to toggle)
libssh 0.8.7-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,068 kB
  • sloc: ansic: 59,318; cpp: 480; sh: 60; makefile: 45; python: 9
file content (60 lines) | stat: -rwxr-xr-x 1,781 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
#!/usr/bin/make -f

DEB_CMAKE_EXTRA_FLAGS := -DWITH_STATIC_LIB=ON -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) -DUNIT_TESTING=ON -DWITH_GSSAPI=ON

BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libnacl-dev")

export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_clean:
	rm -rf debian/tmp-gcrypt
	rm -rf debian/home-openssl
	rm -rf debian/home-gcrypt
	dh_clean

override_dh_auto_clean:
	dh_auto_clean -Bbuild-openssl
	dh_auto_clean -Bbuild-gcrypt

override_dh_auto_configure:
	dh_auto_configure -Bbuild-openssl -- \
		$(DEB_CMAKE_EXTRA_FLAGS)
	dh_auto_configure -Bbuild-gcrypt -- \
		$(DEB_CMAKE_EXTRA_FLAGS) \
		-DWITH_GCRYPT=ON \
		-DLIBSSH_LIBRARY_NAME=ssh-gcrypt

override_dh_auto_build:
	dh_auto_build -Bbuild-openssl
	dh_auto_build -Bbuild-gcrypt
# only build documentation if doxygen is installed and the nodoc profile is not set
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
ifneq ($(shell which doxygen),)
	$(MAKE) -Cbuild-openssl docs
endif
endif

override_dh_auto_install:
	dh_auto_install -Bbuild-openssl
	dh_auto_install -Bbuild-gcrypt --destdir=debian/tmp-gcrypt

override_dh_auto_test:
	mkdir debian/home-openssl
	mkdir debian/home-gcrypt
	HOME=debian/home-openssl dh_auto_test -Bbuild-openssl --no-parallel
	HOME=debian/home-gcrypt dh_auto_test -Bbuild-gcrypt --no-parallel

override_dh_install:
	find debian/tmp-gcrypt -name libssh-gcrypt.so -execdir mv '{}' libssh.so \;
	dh_install -plibssh-gcrypt-4 -plibssh-gcrypt-dev --sourcedir=debian/tmp-gcrypt
	dh_install --remaining-packages

override_dh_strip:
	dh_strip --dbgsym-migration='libssh-dbg (<< 0.7.3-1~)'

override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using="$(BUILT_USING)"