File: rules

package info (click to toggle)
libzstd 1.4.8%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,632 kB
  • sloc: ansic: 74,620; cpp: 2,915; sh: 2,719; python: 2,213; makefile: 2,162
file content (51 lines) | stat: -rwxr-xr-x 1,591 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
#!/usr/bin/make -f

export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# Upstream's makefiles will respect PREFIX, and this means we avoid a patch
export PREFIX=/usr

HELP2MAN = help2man --no-info --help-option="'-h'" --no-discard-stderr
mandir := $(CURDIR)/debian/zstd/usr/share/man/man1

%:
	dh $@

DH_AUTO_CONFIGURE_OPTS :=
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	DH_AUTO_CONFIGURE_OPTS += -DZSTD_BUILD_TESTS:BOOL=OFF
endif

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --sourcedirectory=contrib/pzstd

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --sourcedirectory=lib -- all libzstd.pc libzstd
	dh_auto_build --sourcedirectory=contrib/pzstd/ -- pzstd

override_dh_install:
	# Call d-shlibmove to comply with library packaging guide
	d-shlibmove --commit \
				--multiarch \
				--devunversioned \
				--exclude-la \
				--movedev "debian/tmp/usr/include/*" usr/include \
				--movedev "debian/tmp/usr/lib/pkgconfig/*" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
				debian/tmp/usr/lib/lib*.so
	cp -r debian/libzstd1/usr debian/libzstd1-udeb/
	dh_install

override_dh_makeshlibs:
	dh_makeshlibs -plibzstd1 -V'libzstd1 (>= 1.4.0)' --add-udeb=libzstd1-udeb

override_dh_installman:
	dh_installman
	cp $(mandir)/zstd.1 $(mandir)/zstdmt.1
	$(HELP2MAN) --name='parallelised Zstandard compression, al la pigz' contrib/pzstd/pzstd \
	| perl -pe 's/(\(de\)compression\s\(default:)(\d+)(\))/$$1 All$$3/g' >$(mandir)/pzstd.1