Files
wolfssl/debian/rules.in
Andrew Hutchings b8df4d84e9 Cleanup debian build
* CFLAGS get pulled in anyway with configure options, or part of the
  env, we don't need to add them
* Path handling went wrong in one specific platform test run
2025-09-23 06:39:04 +01:00

62 lines
1.7 KiB
Makefile

#!/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