cpupower: split unitdir from libdir in Makefile
authorFrancesco Poli (wintermute) <invernomuto@paranoici.org>
Wed, 21 May 2025 21:14:39 +0000 (23:14 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 9 Jun 2025 16:17:46 +0000 (10:17 -0600)
commite044b8a9545cd8265c7110c179aeec2624c16455
tree58dd8f8d4d921e0b7f5d0502b144675b66018353
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
cpupower: split unitdir from libdir in Makefile

Improve the installation procedure for the systemd service unit
'cpupower.service', to be more flexible. Some distros install libraries
to /usr/lib64/, but systemd service units have to be installed to
/usr/lib/systemd/system: as a consequence, the installation procedure
should not assume that systemd service units can be installed to
${libdir}/systemd/system ...
Define a dedicated variable ("unitdir") in the Makefile.

Link: https://lore.kernel.org/linux-pm/260b6d79-ab61-43b7-a0eb-813e257bc028@leemhuis.info/T/#m0601940ab439d5cbd288819d2af190ce59e810e6
Fixes: 9c70b779ad91 ("cpupower: add a systemd service to run cpupower")

Link: https://lore.kernel.org/r/20250521211656.65646-1-invernomuto@paranoici.org
Signed-off-by: Francesco Poli (wintermute) <invernomuto@paranoici.org>
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/Makefile