File: include.am

package info (click to toggle)
wolfssl 5.8.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 117,604 kB
  • sloc: ansic: 1,584,954; asm: 481,206; sh: 11,586; cs: 6,596; xml: 3,878; perl: 3,291; makefile: 2,058; ada: 1,891; javascript: 748; python: 636; cpp: 131; ruby: 118; objc: 80; tcl: 73
file content (77 lines) | stat: -rw-r--r-- 3,453 bytes parent folder | download | duplicates (5)
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
# vim:ft=automake

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

deb:
# Setup meta folders
	mkdir -p debian/libwolfssl/DEBIAN debian/libwolfssl-dev/DEBIAN
# "Install" wolfSSL
	make install exec_prefix=$(CURDIR)/debian/libwolfssl/usr \
		prefix=$(CURDIR)/debian/libwolfssl-dev/usr
# deb shared lib stuff
	fakeroot dh_makeshlibs
	dh_shlibdeps
	dh_installdeb
# Generate the lib and src descriptions
	fakeroot dh_gencontrol
# Make adjustments to the package structure and to satisfy lintian checks
# Correct doc dir name
	@rm -rf debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev
	@mv debian/libwolfssl-dev/usr/share/doc/wolfssl \
		debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev
# Clear lib folder
	@rm -rf debian/libwolfssl-dev/usr/lib
	@mkdir -p debian/libwolfssl-dev/usr/lib
# Move the top level .so into the dev pkg
	@mv debian/libwolfssl/usr/lib/libwolfssl.so debian/libwolfssl-dev/usr/lib
# Create correct pkg doc dir
	@rm -rf debian/libwolfssl/usr/share/doc/libwolfssl
	@mkdir -p debian/libwolfssl/usr/share/doc/libwolfssl
# Place changelog
	@gzip -n -9 -c debian/changelog | \
		tee debian/libwolfssl/usr/share/doc/libwolfssl/changelog.gz > \
		debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev/changelog.gz
# Place copyright
	@cp debian/copyright debian/libwolfssl/usr/share/doc/libwolfssl
	@cp debian/copyright debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev
# Remove .la file https://wiki.debian.org/ReleaseGoals/LAFileRemoval
	@rm debian/libwolfssl/usr/lib/libwolfssl.la
# Strip unwanted symbols
# https://www.debian.org/doc/debian-policy/ch-files.html#binaries
	@strip --strip-unneeded debian/libwolfssl/usr/lib/libwolfssl.so.*.*.*
# Place pkgconfig so that it is available for cross-compilation
# https://lintian.debian.org/tags/pkg-config-unavailable-for-cross-compilation
	@rm -rf debian/libwolfssl/usr/lib/$(DEB_HOST_MULTIARCH)
	@mkdir -p debian/libwolfssl/usr/lib/$(DEB_HOST_MULTIARCH)
	@mv debian/libwolfssl/usr/lib/pkgconfig \
		debian/libwolfssl/usr/lib/$(DEB_HOST_MULTIARCH)
# Set the expected access rules
	@chmod 644 debian/libwolfssl/usr/lib/libwolfssl.so.*.*.*
	@chmod 644 debian/libwolfssl/usr/share/doc/libwolfssl/changelog.gz \
		debian/libwolfssl/usr/share/doc/libwolfssl/copyright \
		debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev/changelog.gz \
		debian/libwolfssl-dev/usr/share/doc/libwolfssl-dev/copyright
# Do this as the last step to mark all directories with the correct access bits
	@find debian/libwolfssl*/usr -type d | xargs chmod 755
# Generate debs
	dpkg-deb --root-owner-group -b debian/libwolfssl .
	dpkg-deb --root-owner-group -b debian/libwolfssl-dev .
# Check that everything is correct with lintian
# - we don't provide a manual page for wolfssl-config
# - we don't care about matching the soname for our debs
	lintian *.deb --fail-on error,warning --tag-display-limit 0 \
		--suppress-tags no-manual-page,package-name-doesnt-match-sonames
# Clean up the working dirs
	make deb-clean

deb-docker:
	docker build -t "debian-builder:Dockerfile" Docker/packaging/debian
	docker run --rm -v $(CURDIR):/opt/wolfssl debian-builder:Dockerfile \
		bash -c 'cd /opt/wolfssl && ./config.status --recheck && make deb && \
				make clean deb-clean &> /dev/null'
# To allow the user to keep using the configuration on the host
	@./config.status --recheck &> /dev/null

deb-clean:
	rm -rf debian/libwolfssl debian/libwolfssl-dev debian/files \
		debian/*.substvars debian/.debhelper