Name libzstd1
Description fast lossless compression algorithm
Version 1.5.7+dfsg-1
Package Base libzstd
Homepage https://github.com/facebook/zstd
Maintainers ['RPM packaging team <team+pkg-rpm@tracker.debian.org>']
Contributors ['Peter Pentchev <roam@debian.org>,']
Distro-repo https://salsa.debian.org/pkg-rpm-team/libzstd
Sources ['https://sources.debian.org/data/main/libz/libzstd/1.5.7+dfsg-1/debian/watch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0006-Use-bash-for-test-script-portablitity.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0008-Address-embedded-zlib.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0013-skip-memory-greedy-tests.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0014-Reproducible-build.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0017-alpha-fbfs-st_mtime.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0022-tests-timeout.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0023-cmake-min-3.13.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/0024-no-lessopen-test.patch', 'https://sources.debian.org/src/libzstd/1.5.7+dfsg-1/debian/patches/series']
Dependencies ['libc6']
Optional-Dependencies []
Build-Dependencies ['debhelper', 'dh-package-notes', 'dpkg-build-api', 'cmake', 'help2man', 'less <!nocheck>', 'liblz4-dev', 'liblzma-dev', 'python3 <!nocheck>', 'zlib1g-dev']
Provides []
Builddate
Architecture amd64
Distro-Version trixie
Licenses []
Hash 2f6a2aeacfc925eba8b00ac9139bc4bfccf8cacb09eb93de067074b26948eef9
#!/usr/bin/make -f

# Export build tools for all targets to avoid build hash changes.
DPKG_EXPORT_BUILDTOOLS=1

include /usr/share/dpkg/default.mk

include /usr/share/debhelper/dh_package_notes/package-notes.mk

export DH_VERBOSE=1

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_CMAKE_CONFIGURE_OPTS := \
	-DCMAKE_LIBRARY_ARCHITECTURE=${DEB_HOST_MULTIARCH} \
	-DZSTD_LEGACY_SUPPORT:BOOL=ON \

ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	DH_CMAKE_CONFIGURE_OPTS += -DBUILD_TESTING:BOOL=OFF
else
	DH_CMAKE_CONFIGURE_OPTS += -DBUILD_TESTING:BOOL=ON
endif

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
# Verbose output for the default 'make' build system
export V=1
endif

%:
	dh '$@'

execute_after_dh_auto_clean:
	dh_auto_clean -D contrib/pzstd
	dh_auto_clean -D doc/educational_decoder
	dh_auto_clean \
		--buildsystem=cmake \
		--sourcedir=$(CURDIR)/build/cmake

execute_after_dh_auto_configure:
	dh_auto_configure \
		--buildsystem=cmake \
		--sourcedir=$(CURDIR)/build/cmake \
		-- \
		$(DH_CMAKE_CONFIGURE_OPTS)

execute_after_dh_auto_build:
	dh_auto_build -D contrib/pzstd

override_dh_auto_install:
	dh_auto_install -- libdir=/usr/lib/${DEB_HOST_MULTIARCH}
	dh_auto_install -D contrib/pzstd

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

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_installman:
	cp $(mandir)/zstd.1 $(mandir)/zstdmt.1
	$(HELP2MAN) --name='parallelized Zstandard compression, a la pigz' contrib/pzstd/pzstd \
	| perl -pe 's/(\(de\)compression\s\(default:)(\d+)(\))/$$1 All$$3/g' >$(mandir)/pzstd.1
endif

build:
	dh $@

.PHONY: build