Add systemd service unit to contrib

Apply sed to reflect prefix but don't install it and clean service file in makefile. Add service file to gitignore
This commit is contained in:
Eizen 2016-12-21 01:57:16 -03:00
parent 810637b2b6
commit f32659adb7
3 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,5 +5,6 @@ vgcore.*
config.h
dunst.1
org.knopwob.dunst.service
dunst.systemd.service
dunstify
test/test

View File

@ -47,6 +47,7 @@ debug: ${OBJ}
clean-dunst:
rm -f dunst ${OBJ} main.o
rm -f org.knopwob.dunst.service
rm -f dunst.systemd.service
clean-dunstify:
rm -f dunstify
@ -62,6 +63,7 @@ docs/dunst.1: docs/dunst.pod
service:
@sed "s|##PREFIX##|$(PREFIX)|" org.knopwob.dunst.service.in > org.knopwob.dunst.service
@sed "s|##PREFIX##|$(PREFIX)|" contrib/dunst.systemd.service.in > dunst.systemd.service
install-dunst: dunst doc
mkdir -p ${DESTDIR}${PREFIX}/bin

View File

@ -0,0 +1,11 @@
[Unit]
Description=Dunst notification daemon
[Service]
Type=simple
ExecStart=##PREFIX##/bin/dunst
Environment=DISPLAY=:0
[Install]
WantedBy=multi-user.target