#!/usr/bin/make -f

export DH_VERBOSE=1

#include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/class/cmake.mk
#DEB_DBG_PACKAGES := tora-dbg

install/tora::
	# remove some file we don't want to install
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/README.OSX
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/README.LICENSE
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/README.WINDOWS
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/INSTALL
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/COPYING
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/ChangeLog
	rm -f $(CURDIR)/debian/tmp/usr/share/doc/tora/changelog
	# this file cannot be installed by dh_install because it has to be renamed
	-install --owner root --group root --mode=644 $(CURDIR)/src/icons/toramini.xpm $(CURDIR)/debian/tora/usr/share/icons/hicolor/16x16/apps/tora.xpm
	# we have a desktop file
	-install --owner root --group root --mode=644 $(CURDIR)/debian/tora.desktop $(CURDIR)/debian/tora/usr/share/applications

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Debug -DUSE_PCH=true

override_dh_install:
	@echo "skip dh_install"

override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info --exclude=debian/tora/usr/lib64/libtrotl.so --exclude debian/tora/usr/lib64/tora-3.0/libporacle.so

