[RigoDaemon] make the application part be in /usr/libexec
This way there is no hardcoded /usr/lib/rigo, and the "executable" part is in a well known location which can be replicated on system for different Python implementations. (As in: it will be like /usr/bin/foo.py which on Gentoo links to a system wrapper making it use configured Python.)
This commit is contained in:
@@ -2,15 +2,17 @@ SUBDIRS = dbus polkit
|
||||
PREFIX = /usr
|
||||
BINDIR = $(PREFIX)/bin
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
LIBEXECDIR = $(PREFIX)/libexec
|
||||
DESTDIR =
|
||||
|
||||
all:
|
||||
for d in $(SUBDIRS); do $(MAKE) -C $$d; done
|
||||
|
||||
install:
|
||||
install -d $(DESTDIR)$(LIBEXECDIR)
|
||||
install -d $(DESTDIR)$(LIBDIR)/rigo/RigoDaemon
|
||||
install -m 644 $(wildcard *.py) $(DESTDIR)$(LIBDIR)/rigo/RigoDaemon/
|
||||
install -m 755 app.py $(DESTDIR)$(LIBDIR)/rigo/RigoDaemon/
|
||||
install -m 755 app/RigoDaemon_app.py $(DESTDIR)$(LIBEXECDIR)/
|
||||
for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
|
||||
|
||||
clean:
|
||||
|
||||
@@ -53,8 +53,8 @@ if "--daemon-logging" in sys.argv:
|
||||
|
||||
|
||||
from os import path as osp
|
||||
_base = osp.dirname(
|
||||
osp.dirname(osp.dirname(osp.realpath(__file__))))
|
||||
_base = osp.dirname(osp.dirname(
|
||||
osp.dirname(osp.dirname(osp.realpath(__file__)))))
|
||||
if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")):
|
||||
sys.path.insert(0, osp.join(_base, "entropy_path_loader"))
|
||||
else:
|
||||
@@ -3,4 +3,4 @@
|
||||
if [ -f "/etc/profile" ]; then
|
||||
. /etc/profile
|
||||
fi
|
||||
exec /usr/lib/rigo/RigoDaemon/app.py "$@"
|
||||
exec /usr/libexec/RigoDaemon_app.py "$@"
|
||||
|
||||
@@ -15,5 +15,5 @@ sudo cp polkit/org.sabayon.RigoDaemon.policy /usr/share/polkit-1/actions/ || exi
|
||||
|
||||
cd ../ || exit 1
|
||||
# GDB?
|
||||
# sudo gdb --args python2 ./RigoDaemon/app.py --debug
|
||||
sudo python2 ./RigoDaemon/app.py --debug
|
||||
# sudo gdb --args python2 ./RigoDaemon/app/RigoDaemon_app.py --debug
|
||||
sudo python2 ./RigoDaemon/app/RigoDaemon_app.py --debug
|
||||
|
||||
Reference in New Issue
Block a user