#!/usr/bin/make -f

%:
	dh $@ -Scmake+ninja --with quilt

override_dh_auto_configure:
	dh_auto_configure -- \
	-DARMOPT=False \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DHAVE_OPENCV=1

override_dh_install:
	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)

	mv debian/tmp/usr/lib/libw2xc* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/

	rm -rf debian/tmp/usr/share/waifu2x-converter-cpp/

# Not yet
#	mv debian/tmp/usr/bin/waifu2x-converter-cpp debian/tmp/usr/bin/waifu2x-converter
	rm debian/tmp/usr/bin/waifu2x-converter-cpp

	dh_install

override_dh_clean:
	dh_clean test_src.png models_rgb/noise1_model.json.bin \
	models_rgb/noise2_model.json.bin models_rgb/scale2.0x_model.json.bin

override_dh_dwz override_dh_auto_test:
