2025-02-09 07:36:00 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2025-02-09 07:39:36 +01:00
|
|
|
include /usr/share/dpkg/architecture.mk
|
2025-02-09 07:36:00 +01:00
|
|
|
|
2025-02-09 07:41:17 +01:00
|
|
|
ifneq (,$(filter $(DEB_HOST_ARCH), armel x32))
|
|
|
|
PLATFORM = --platform=unknown
|
|
|
|
endif
|
|
|
|
|
2025-02-09 07:42:22 +01:00
|
|
|
ifeq ($(DEB_HOST_ARCH),armhf)
|
|
|
|
DEB_CFLAGS_MAINT_APPEND = -march=armv7-a+fp
|
|
|
|
export DEB_CFLAGS_MAINT_APPEND
|
|
|
|
endif
|
|
|
|
|
2025-02-09 07:41:17 +01:00
|
|
|
ifeq ($(DEB_HOST_ARCH), i386)
|
|
|
|
PLATFORM = --disable-sse
|
2025-02-09 07:39:36 +01:00
|
|
|
endif
|
2025-02-09 07:36:00 +01:00
|
|
|
|
2025-02-09 07:43:58 +01:00
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
else
|
|
|
|
NUMJOBS = 1
|
|
|
|
endif
|
|
|
|
|
2025-02-09 07:36:00 +01:00
|
|
|
%:
|
2025-02-09 07:39:36 +01:00
|
|
|
dh ${@}
|
2025-02-09 07:36:00 +01:00
|
|
|
|
2025-02-09 07:43:44 +01:00
|
|
|
execute_after_dh_auto_clean:
|
|
|
|
# remove generated files
|
|
|
|
rm -f doc/*.gz src/*.a src/*.so
|
|
|
|
for FILE in $$(find . -type f -name "*.in"); \
|
|
|
|
do \
|
|
|
|
rm -f "$$(dirname "$${FILE}")"/"$$(basename "$${FILE}" .in)"; \
|
|
|
|
done
|
|
|
|
|
2025-02-09 07:39:36 +01:00
|
|
|
override_dh_auto_configure:
|
|
|
|
dh_auto_configure -- \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
|
|
|
|
--includedir=/usr/include \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--cores=2 \
|
2025-02-09 07:41:17 +01:00
|
|
|
$(PLATFORM)
|
2025-02-09 07:36:00 +01:00
|
|
|
|
2025-02-09 07:39:36 +01:00
|
|
|
override_dh_auto_test:
|
2025-02-09 07:42:06 +01:00
|
|
|
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 i386))
|
2025-02-09 07:43:58 +01:00
|
|
|
ifneq ($(NUMJOBS), 1)
|
2025-02-09 07:39:36 +01:00
|
|
|
$(MAKE) -j1 check
|
2025-02-09 07:41:35 +01:00
|
|
|
endif
|
2025-02-09 07:43:58 +01:00
|
|
|
endif
|