#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

%:
	dh $@ --buildsystem=pybuild

ifneq (,$(DEB_BUILD_OPTION_PARALLEL))
  PARALLEL=$(DEB_BUILD_OPTION_PARALLEL)
else
  PARALLEL=$$(nproc)
endif

execute_before_dh_auto_build:
	PARALLEL=$(PARALLEL) ./run.sh

execute_after_dh_fixperms:
	chmod -x $(CURDIR)/debian/python3-opencascade-pywrap/usr/lib/python*/dist-packages/bindgen/*
	chmod -x $(CURDIR)/debian/python3-opencascade-pywrap/usr/share/libocp/OCP/FindOpenCascade.cmake
