mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 08:23:50 -04:00
qol fixes: Update Makefile and add systemd unit
This removes the makefile packaging target, since it wasn't really all that useful for distribution of the program. Additionally, this sets up an install target to install g13d to the users' local directory. This is kinda a hack -- really we should be installing g13d to $PREFIX/bin, dropping a g13d unit somewhere, and then setting up appropriate permissions, etc. It works for me, though.
This commit is contained in:
parent
815e0001cb
commit
9bf08d1d6d
15
Makefile
15
Makefile
@ -39,11 +39,14 @@ g13d: g13_main.o g13.o g13_log.o g13_fonts.o g13_lcd.o g13_stick.o g13_keys.o he
|
|||||||
pbm2lpbm: pbm2lpbm.c
|
pbm2lpbm: pbm2lpbm.c
|
||||||
g++ -o pbm2lpbm pbm2lpbm.c
|
g++ -o pbm2lpbm pbm2lpbm.c
|
||||||
|
|
||||||
package:
|
|
||||||
rm -Rf g13-userspace
|
|
||||||
mkdir g13-userspace
|
|
||||||
cp g13.cc g13.h logo.h Makefile pbm2lpbm.c g13-userspace
|
|
||||||
tar cjf g13-userspace.tbz2 g13-userspace
|
|
||||||
rm -Rf g13-userspace
|
|
||||||
clean:
|
clean:
|
||||||
rm -f g13 pbm2lpbm
|
rm -f g13 pbm2lpbm
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d ${HOME}/.local/bin
|
||||||
|
install -m700 -d ${HOME}/.local/var/g13d
|
||||||
|
install -d ${HOME}/.config/systemd/user
|
||||||
|
cat g13d.service |sed "s,@HOME@,${HOME},g" > ${HOME}/.config/systemd/user/g13d.service
|
||||||
|
install -m755 g13d ${HOME}/.local/bin/g13d
|
||||||
|
|
||||||
|
.PHONY: all clean install
|
||||||
|
7
g13d.service
Normal file
7
g13d.service
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Logitech g13 daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=@HOME@/.local/bin/g13d --pipe_in @HOME@/.local/var/g13d/in --pipe_out @HOME@/.local/var/g13d/out
|
||||||
|
Restart=on-failure
|
Loading…
Reference in New Issue
Block a user