#!/usr/bin/make -f

%:
	dh $@ --buildsystem=meson --prefix=/usr

override_dh_auto_configure:
	dh_auto_configure -- -Duse_sys_yara=auto
override_dh_auto_install:
	dh_auto_install
	mkdir -p cutter-plugin/build
override_dh_install:
	dh_install
	$(shell cd cutter-plugin/build && cmake -DRIZIN_INSTALL_PLUGDIR="../obj-$(DEB_HOST_GNU_TYPE)/" .. && make -j4)
	install $(CURDIR)/cutter-plugin/build/libcutter_yara_plugin.so $(CURDIR)/debian/rizin-plugin-libyara/usr/share/rizin/cutter/plugins/native/
	dh_install

