psi-notify icon indicating copy to clipboard operation
psi-notify copied to clipboard

Use systemd_user_unit_dir from systemd.pc, if found

Open michel-slm opened this issue 2 years ago • 3 comments

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]

michel-slm avatar Sep 15 '22 09:09 michel-slm

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

michel-slm avatar Sep 15 '22 09:09 michel-slm

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? :-)

cdown avatar Sep 26 '22 12:09 cdown

Been a bit, but just checking if you saw the compat question above :-)

cdown avatar Mar 11 '24 11:03 cdown