| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
NUMJOBS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) |
| 4 |
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 5 |
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 6 |
MAKEFLAGS += -j$(NUMJOBS) |
| 7 |
else |
| 8 |
DEB_BUILD_OPTIONS += parallel=$(NUMJOBS) |
| 9 |
export DEB_BUILD_OPTIONS |
| 10 |
endif |
| 11 |
|
| 12 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 13 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 14 |
include /usr/share/dpkg/default.mk |
| 15 |
|
| 16 |
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -ltinyxml |
| 17 |
|
| 18 |
# ppc64el FTBFS due to `undefined symbol __parse_hwcap_and_convert_at_platform` |
| 19 |
# https://lists.debian.org/debian-powerpc/2026/03/msg00032.html |
| 20 |
ifeq ($(DEB_HOST_ARCH),ppc64el) |
| 21 |
export DEB_LDFLAGS_MAINT_APPEND += -lgcc -lgcc_s -lc |
| 22 |
endif |
| 23 |
|
| 24 |
# Disable WXDEBUG checks, which wx3.0 defaults to enabling but were off by |
| 25 |
# default in wx2.8, to address issues such as #736368. |
| 26 |
# Also enable reproducible builds by ensuring that timestamps are reproducible; |
| 27 |
# see #824182. |
| 28 |
export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \ |
| 29 |
-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \ |
| 30 |
-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\"" |
| 31 |
|
| 32 |
%: |
| 33 |
dh $@ |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
# prevents FTBFS |
| 37 |
touch $(CURDIR)/debian/codeblocks-headers.install.wx30 |
| 38 |
|
| 39 |
dh_auto_configure -- --with-contrib-plugins=all,-FileManager \ |
| 40 |
--disable-silent-rules \ |
| 41 |
--libdir=\$${exec_prefix}/lib |
| 42 |
|
| 43 |
override_dh_install: |
| 44 |
find $(CURDIR)/debian/tmp -name "*.la" -delete |
| 45 |
dh_install |
| 46 |
|
| 47 |
override_dh_strip: |
| 48 |
dh_strip --dbgsym-migration='codeblocks-dbg (<< 17)' |
| 49 |
|
| 50 |
override_dh_makeshlibs: |
| 51 |
dh_makeshlibs -Xusr/lib/codeblocks/plugins -Xusr/lib/codeblocks/wxContribItems |
| 52 |
|
| 53 |
override_dh_shlibdeps: |
| 54 |
dh_shlibdeps -Xusr/lib/codeblocks/plugins |