Merge pull request #460 from gdamjan/master

service file: allow for waybar installed in different prefix
pull/465/head
Alex 2019-09-12 17:40:03 +02:00 committed by GitHub
commit db74a46d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -64,10 +64,19 @@ libudev = dependency('libudev', required: get_option('libudev'))
libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
systemd = dependency('systemd', required: get_option('systemd'))
prefix = get_option('prefix')
conf_data = configuration_data()
conf_data.set('prefix', prefix)
if systemd.found()
user_units_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
install_data('./resources/waybar.service',
install_dir: user_units_dir)
configure_file(
configuration: conf_data,
input: './resources/waybar.service.in',
output: '@BASENAME@',
install_dir: user_units_dir
)
endif
src_files = files(

View File

@ -6,7 +6,7 @@ PartOf=wayland-session.target
[Service]
Type=dbus
BusName=fr.arouillard.waybar
ExecStart=/usr/bin/waybar
ExecStart=@prefix@/bin/waybar
[Install]
WantedBy=wayland-session.target