#!/usr/bin/make -f
%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DUSE_ATASMART=YES
override_dh_auto_install:
	dh_auto_install
	rm $(CURDIR)/debian/thinkfan/usr/share/doc/thinkfan/thinkfan.yaml
	rm $(CURDIR)/debian/thinkfan/usr/share/doc/thinkfan/COPYING
	install -D -m0644 examples/thinkfan.yaml $(CURDIR)/debian/thinkfan/etc/thinkfan.yaml
	install -D -m0755 rcscripts/sysvinit/thinkfan.init $(CURDIR)/debian/thinkfan/etc/init.d/thinkfan
	install -D -m0644 rcscripts/sysvinit/thinkfan.default $(CURDIR)/debian/thinkfan/etc/default/thinkfan

override_dh_installinit:
	dh_installinit --onlyscripts

override_dh_installsystemd:
	# Do not enable the file by default on purpose.
	# The user should enable it only after making sure the configuration is
	# appropriate for his/her computer.
	# This corresponds to START=no in /etc/default/thinkfan
	dh_installsystemd --no-enable
