Install issues when using a custom prefix
CoreCtrl version:
Latest git commit (13353928)
Distribution:
Debian Unstable
Kernel version:
Not relevant
GPU model:
Not relevant
GPU driver:
Not relevant
GPU driver parameters:
Not relevant
Description of the bug
According to the dbus-daemon manpage, D-Bus reads system service files from /lib/dbus-1/system-services, $datadir/dbus-1/system-services (datadir = /usr/share in most cases, this is a dbus-daemon extension), /usr/share/dbus-1/system-services, /usr/local/share/dbus-1/system-services. Configuration files are read from /usr/share/dbus-1/system.d, /etc/dbus-1/system.d (for sysadmins).
However, after building CoreCtrl with a custom prefix, service files are installed to $prefix/share/dbus-1/system-services and configuration files are installed to $prefix/share/dbus-1/system.d.
In addition to this, the service files org.corectrl.helper{,killer}.service both contain an incorrect Exec=... line in this case (both pointing to /usr/lib/kauth/libexec/corectrl_helper{,killer}, when they should be pointing to $prefix/lib/kauth/libexec/corectrl_helper{,killer}).
This issue prevents CoreCtrl from launching.
BTW, I wasn't sure if to post this as one or two issues, since they are both caused by the same steps and both lead to the same result (CoreCtrl not launching).
Reproduction
1. git clone https://gitlab.com/corectrl/corectrl.git
2. cd corectrl
3. mkdir build
4. cd build
5. cmake -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
6. make install
Actual result:
The aforementioned files are installed under /opt instead of the correct locations, and the service files point to non-existent binaries.
Expected result:
The files are installed into their standard locations, and the Exec=... lines in the service files contain the correct paths to the binaries (under /opt in this case).