File: rules

package info (click to toggle)
libcrypto%2B%2B 8.7.0%2Bgit220824-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 23,828 kB
  • sloc: cpp: 109,681; asm: 10,488; sh: 8,875; makefile: 54
file content (82 lines) | stat: -rwxr-xr-x 2,476 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
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
#!/usr/bin/make -f
# -*- makefile -*-

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DOC_PKG_DIR = $(CURDIR)/debian/libcrypto++-doc/


include /usr/share/dpkg/architecture.mk

ifneq ($(filter $(DEB_HOST_ARCH),armel powerpc),)
        export DEB_LDFLAGS_MAINT_APPEND= -latomic
endif

SONAME=8

PREFIX=/usr
LIBDIR=$(PREFIX)/lib/$(DEB_HOST_MULTIARCH)/

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/libcrypto++.pc.in $(CURDIR)/config.log
	rm -rf $(CURDIR)/html-docs/
	# these will be re-generated
	rm -f $(CURDIR)/debian/libcrypto++$(SONAME).links \
		$(CURDIR)/debian/libcrypto++-dev.links

override_dh_auto_build-arch:
	PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) dh_auto_build -a \
	       -- all libcrypto++.pc

override_dh_auto_build-indep:
	doxygen

override_dh_auto_install:
	# use automake
	PREFIX=$(PREFIX) LIBDIR=$(LIBDIR) dh_auto_install
	# install test files
	mkdir -p $(CURDIR)/debian/tmp/usr/share/crypto--/
	cp -a $(CURDIR)/TestVectors $(CURDIR)/debian/tmp/usr/share/crypto--/
	chmod a-x $(CURDIR)/debian/tmp/usr/share/crypto--/TestVectors/*.txt
	cp -a $(CURDIR)/TestData $(CURDIR)/debian/tmp/usr/share/crypto--/
	# install pkg-config file
	mkdir -p $(CURDIR)/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/
#	cp -a $(CURDIR)/*.pc \
		$(CURDIR)/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/
	# generate links files
	sed s/ARCH/${DEB_HOST_MULTIARCH}/g \
		$(CURDIR)/debian/libcrypto++$(SONAME).links.in \
		>$(CURDIR)/debian/libcrypto++$(SONAME).links
	sed s/ARCH/${DEB_HOST_MULTIARCH}/g \
		$(CURDIR)/debian/libcrypto++-dev.links.in \
		>$(CURDIR)/debian/libcrypto++-dev.links

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(CURDIR)/cryptest v
endif

override_dh_auto_test-indep:

override_dh_installdocs:
	dh_installdocs
	if [ -d "$(DOC_PKG_DIR)/usr/share/doc/libcrypto++-dev/html-docs" ]; then \
		mv $(DOC_PKG_DIR)/usr/share/doc/libcrypto++-dev/html-docs \
		$(DOC_PKG_DIR)/usr/share/doc/libcrypto++-dev/html; \
	fi

# skip files failing with "Unknown DWARF DW_OP_255" (see bug#949296)
override_dh_dwz:
	dh_dwz --exclude=usr/bin/cryptest \
		--exclude=usr/lib/$(DEB_HOST_MULTIARCH)/libcrypto++.so.8.6.0

%:
	dh $@

.PHONY: override_dh_auto_clean override_dh_auto_build-arch \
	override_dh_auto_build-indep override_dh_auto_install \
	override_dh_installdocs override_dh_dwz \
	override_dh_auto_test-arch override_dh_auto_test-indep