summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-09-04 16:32:35 +0100
committerColin Guthrie <colin@mageia.org>2013-09-04 17:46:59 +0100
commit738779e2e5245a33c6e42720e153baa068d276b5 (patch)
tree81fc0d9d4da07d13cf2fa46f13d8214f159f7140 /Makefile
parent530835e736420dd9b0c464446e3130e3249f6078 (diff)
downloaddrakx-kbd-mouse-x11-738779e2e5245a33c6e42720e153baa068d276b5.tar
drakx-kbd-mouse-x11-738779e2e5245a33c6e42720e153baa068d276b5.tar.gz
drakx-kbd-mouse-x11-738779e2e5245a33c6e42720e153baa068d276b5.tar.bz2
drakx-kbd-mouse-x11-738779e2e5245a33c6e42720e153baa068d276b5.tar.xz
drakx-kbd-mouse-x11-738779e2e5245a33c6e42720e153baa068d276b5.zip
Convert to polkit from usermode consolehelper for gaining root privileges
polkit is better integrated into various environments, both console and GUI and offers better access rules and prevents the internal need to run su which is prone to errors and doesn't offer an environment agnostic prompt to the user. Under the old scheme, the binaries relating to the three main tools covered in this package behaved differently. Keyboard and Mouse are allowed to be run without any password prompts, whereas X11 prompts for the *user* password. This is only true when run as their 'old' names of keyboarddrake, mousedrake and XFdrake respectively. If they are called via their 'new' names of drakkeyboard, drakmouse and drakx11, they would prompt for the root password. This change also standardises that behaviour. The tools now follow the scheme specified for their old names, regardless of how they are called. mga#11125
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 276a9df..2f3f8a3 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ DESTDIR=
libdir=/usr/lib
bindir=/usr/bin
sbindir=/usr/sbin
+libexecdir=/usr/libexec
+polkitpolicydir=/usr/share/polkit-1/actions
desktopdir=/usr/share/applications
autostartdir=/usr/share/autostart
xinitdir=/etc/X11/xinit.d
@@ -11,7 +13,7 @@ iconsdir=/usr/lib/libDrakX/icons
pixmapsdir=/usr/share/libDrakX/pixmaps
BIN_TOOLS=
-SBIN_TOOLS= keyboarddrake mousedrake XFdrake drakx-update-background display_driver_helper
+SBIN_TOOLS= drakx-update-background display_driver_helper
INLIBDEST_DIRS = lib/xf86misc
all: $(INLIBDEST_DIRS)
@@ -24,7 +26,7 @@ check:
@for p in tools/*; do head -n1 $$p | grep perl || continue; perl -cw $$p || exit 1; done
install:
- install -d $(DESTDIR){$(libdir),$(bindir),$(sbindir),$(desktopdir),$(autostartdir),$(xinitdir),$(iconsdir),$(pixmapsdir)}
+ install -d $(DESTDIR){$(libdir),$(bindir),$(sbindir),$(desktopdir),$(autostartdir),$(xinitdir),$(iconsdir),$(pixmapsdir),$(libexecdir),$(polkitpolicydir)}
install -d $(INLIBDEST_DIRS:%=$(DESTDIR)$(libdir)/libDrakX//%)
cp -a lib/*.pm $(DESTDIR)$(libdir)/libDrakX/
@@ -36,6 +38,15 @@ install:
[[ -n "$(BIN_TOOLS)" ]] && install -m755 $(BIN_TOOLS) $(DESTDIR)$(bindir); \
[[ -n "$(SBIN_TOOLS)" ]] && install -m755 $(SBIN_TOOLS) $(DESTDIR)$(sbindir); \
)
+ install -m755 tools/keyboarddrake $(DESTDIR)$(libexecdir)/drakkeyboard
+ install -m755 tools/mousedrake $(DESTDIR)$(libexecdir)/drakmouse
+ install -m755 tools/XFdrake $(DESTDIR)$(libexecdir)/drakx11
+ install polkit/wrappers/* $(DESTDIR)$(bindir)
+ install polkit/policy/* $(DESTDIR)$(polkitpolicydir)
+ # Some compatibility name wrappers
+ ln -s drakkeyboard $(DESTDIR)$(bindir)/keyboarddrake
+ ln -s drakmouse $(DESTDIR)$(bindir)/mousedrake
+ ln -s drakx11 $(DESTDIR)$(bindir)/XFdrake
#install -m644 $(wildcard data/*.desktop) $(DESTDIR)$(desktopdir)
#install -m644 $(wildcard data/icons/*.png) $(DESTDIR)$(iconsdir)
install -m644 $(wildcard data/pixmaps/*.png) $(DESTDIR)$(pixmapsdir)