#!/usr/bin/make -f # Store the configure options and CFLAGS used during ./configure # This file is generated from rules.in by the configure script CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ ENABLED_FIPS = @ENABLED_FIPS@ # Use debhelper with automatic sequence %: dh $@ # Override configure to use the stored options override_dh_auto_configure: ./configure \ --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --disable-maintainer-mode \ --disable-dependency-tracking \ --enable-shared \ --enable-static \ $(CONFIGURE_OPTIONS) # Override test to skip them (optional, remove if you want to run tests) #override_dh_auto_test: # Skip tests during package build # Handle FIPS builds which require special hash generation override_dh_auto_build: ifeq ($(ENABLED_FIPS),yes) # FIPS build requires two-stage process with hash generation $(MAKE) ./fips-hash.sh $(MAKE) else # Standard build dh_auto_build endif # Handle multiarch library placement and remove .la files override_dh_auto_install: dh_auto_install # Remove .la files (not needed in modern Debian packages) find debian/tmp -name '*.la' -delete # Set proper permissions and strip symbols override_dh_strip: dh_strip --dbgsym-migration='libwolfssl-dbg (<< 5.0.0-1~)' # Auto-clean override - prevent make distclean from removing debian files override_dh_auto_clean: # Run make clean instead of make distclean to preserve debian files if [ -f Makefile ]; then \ $(MAKE) clean; \ fi