#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto export DEB_CFLAGS_MAINT_STRIP = -O3 export DEB_CXXFLAGS_MAINT_STRIP = -O3 PYVERS=$(shell python3 -c 'import sysconfig;print (sysconfig.get_python_version())') PATH_LIB=usr/lib/${DEB_HOST_MULTIARCH} PATH_LIB_PYTHON=usr/lib/python3/dist-packages/onnxruntime/capi %: dh $@ --buildsystem=cmake --sourcedirectory=cmake --builddirectory=. override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_INCLUDEDIR=include \ -Deigen_SOURCE_PATH=/usr/include/eigen3 \ -Donnxruntime_BUILD_BENCHMARKS=ON \ -Donnxruntime_BUILD_SHARED_LIB=ON \ -Donnxruntime_BUILD_UNIT_TESTS=ON \ -Donnxruntime_DISABLE_ABSEIL=ON \ -Donnxruntime_ENABLE_CPUINFO=ON \ -Donnxruntime_ENABLE_PYTHON=ON \ -Donnxruntime_ONNX_PROTO_DATA_DIR=/usr/lib/python3/dist-packages \ -Donnxruntime_ONNX_TEST_DATA_DIR=/usr/share/libonnx-testdata/data \ -Donnxruntime_USE_FULL_PROTOBUF=ON \ -Donnxruntime_USE_PREINSTALLED_EIGEN=ON \ -Donnxruntime_USE_XNNPACK=ON \ -DPYTHON_VERSION=${PYVERS} \ $(NULL) override_dh_auto_build: dh_auto_build # Build Python bindings dh_auto_build --buildsystem=pybuild --sourcedirectory=. override_dh_auto_install: dh_auto_install # Install Python bindings dh_auto_install --buildsystem=pybuild --sourcedirectory=. execute_after_dh_link: # To avoid having large duplicated libraries dh_link -ppython3-onnxruntime \ ${PATH_LIB}/libonnxruntime.so.1.19.2 ${PATH_LIB_PYTHON}/libonnxruntime.so.1.19.2 \ ${PATH_LIB}/libonnxruntime_providers_shared.so.1.19.2 ${PATH_LIB_PYTHON}/libonnxruntime_providers_shared.so override_dh_auto_test: # Do NOT run tests, they depend on *.onnx dataset with unclear license # See https://github.com/microsoft/onnxruntime/issues/8963 override_dh_auto_clean: