Add install dir for systemd units
ClosedPublic

Authored by davidedmundson on Nov 1 2019, 5:05 PM.

Details

Summary

Like we have for other FD.O projects like DBus service files

Test Plan

Unit test passes
Used in another project, and it installed to the correct place

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 1 2019, 5:05 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptNov 1 2019, 5:05 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 1 2019, 5:05 PM
apol accepted this revision.Nov 3 2019, 2:26 AM
This revision is now accepted and ready to land.Nov 3 2019, 2:26 AM
This revision was automatically updated to reflect the committed changes.
fvogt reopened this revision.Nov 25 2019, 1:39 PM
fvogt added a subscriber: fvogt.

AFAICT this breaks if LIBDIR != "lib". systemd only looks in /usr/lib AFAICT, so hardcoding to $prefix/lib/systemd might be better.

This revision is now accepted and ready to land.Nov 25 2019, 1:39 PM
fvogt requested changes to this revision.Nov 25 2019, 1:40 PM
This revision now requires changes to proceed.Nov 25 2019, 1:40 PM
davidedmundson added a comment.EditedNov 25 2019, 1:48 PM

Wow, this part of systemd is surprising :/

static const char* const user_data_unit_paths[] = {

"/usr/local/lib/systemd/user",
"/usr/local/share/systemd/user",
USER_DATA_UNIT_PATH,
"/usr/lib/systemd/user",
"/usr/share/systemd/user",
NULL

};

well spotted, will adjust to ${CMAKE_INSTALL_PREFIX}/lib

cgiboudeaux added inline comments.
kde-modules/KDEInstallDirs.cmake
137–140

These fixme also need to be...fixed :)

fvogt accepted this revision.Nov 25 2019, 6:06 PM
fvogt added inline comments.
kde-modules/KDEInstallDirs.cmake
245

IMO the iff here can stay

This revision is now accepted and ready to land.Nov 25 2019, 6:06 PM
This revision was automatically updated to reflect the committed changes.