psi-notify
psi-notify copied to clipboard
Use systemd_user_unit_dir from systemd.pc, if found
If pkg-config
can find systemd.pc
(e.g.
/usr/share/pkgconfig/systemd.pc
), use its systemd_user_unit_dir
for the location of psi-notify.service
.
We override prefix
to be whatever the user sets, which should work both for the distribution use case (prefix
overridden to /usr
) and for local compilation (prefix
defaults to /usr/local
)
Fall back to the old definition in case systemd.pc
is not found.
Signed-off-by: Michel Alexandre Salim [email protected]
Tested using mock on my Fedora machine
- with this PR but no systemd.pc, a warning is generated
- with this PR and adding BR on pkgconfig(systemd), no warning
Both builds succeed as before
Sorry, this one somehow slipped off my radar :-)
systemd_user_unit_dir
is from v246 onwards -- about two years old since we added it in addition to the non-underscore. So probably alright, but maybe use the one without underscores just to have wider compatibility? :-)
Been a bit, but just checking if you saw the compat question above :-)