#!/usr/bin/make -f %: dh $@ --buildsystem=cmake --with python3 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DEB_BUILD_MAINT_OPTIONS = hardening=+all,+bindnow CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -Wall -fpermissive CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -I/usr/include/python$(shell py3versions -d -v) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed py3ver = $(shell py3versions -d -v | tr -d .) ifeq (1,$(shell expr ${py3ver} \< 38 )) py3ver := $(py3ver)m endif extra_flags += \ -DBUILD_QT5=ON \ -DBUILD_FLAT_MESH=ON \ -DFREECAD_BUILD_DEBIAN=ON \ -DFREECAD_USE_PYBIND11=ON \ -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \ -DCMAKE_C_FLAGS="$(CFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)" \ -DLIB_SUFFIX="" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_DATADIR="/usr/share/freecad" \ -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/freecad-doc" \ -DCMAKE_INSTALL_PREFIX="/usr/share/freecad" \ -DPYTHON_CONFIG_SUFFIX=".cpython-$(py3ver)-$(DEB_HOST_MULTIARCH)" py3_flags = \ -DPYTHON_EXECUTABLE="/usr/bin/python3" \ -DCMAKE_INSTALL_LIBDIR="/usr/lib/freecad-python3/lib" override_dh_auto_configure: dh_auto_configure --builddirectory=debian/build-py3 -- \ $(extra_flags) \ $(py3_flags) override_dh_auto_build: dh_auto_build --builddirectory=debian/build-py3 override_dh_auto_test: dh_auto_test --builddirectory=debian/build-py3 override_dh_auto_install: dh_auto_install --builddirectory=debian/build-py3 mv debian/tmp/usr/share/freecad/bin/FreeCADCmd \ debian/tmp/usr/share/freecad/bin/FreeCADCmd-Python3 mv debian/tmp/usr/share/freecad/bin/FreeCAD \ debian/tmp/usr/share/freecad/bin/FreeCAD-Python3 override_dh_compress: dh_compress -X.qch -X.qhc override_dh_installchangelogs: dh_installchangelogs ChangeLog.txt override_dh_installexamples: override_dh_missing: dh_missing --list-missing