#!/usr/bin/make -f

export DH_VERBOSE = 1
export PYBUILD_NAME = auto-cpufreq

# Upstream pyproject.toml is patched (d/patches) to use poetry-core with a
# static version; pybuild drives the PEP 517 build.
%:
	dh $@ --with python3 --buildsystem=pybuild

# dh_install treats the last component of the install target as a directory
# even without a trailing slash, so rename the script to the name the code
# actually calls.
override_dh_install:
	dh_install
	mv debian/auto-cpufreq/usr/lib/auto-cpufreq/cpufreqctl.sh debian/auto-cpufreq/usr/lib/auto-cpufreq/cpufreqctl.auto-cpufreq

# Do not enable/start the daemon automatically; it conflicts with
# power-profiles-daemon. See README.Debian.
override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

# No upstream test suite.
override_dh_auto_test:
