summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--NEWS3
-rw-r--r--po/Makefile2
-rw-r--r--polkit/Makefile26
-rw-r--r--polkit/org.mageia.drakconf.policy.in (renamed from polkit/policy/org.mageia.control-centre-gui.policy.in)4
-rw-r--r--polkit/org.mageia.drakxconf.policy.in (renamed from polkit/policy/org.mageia.control-centre.policy.in)4
-rwxr-xr-xpolkit/wrappers/drakxconf2
7 files changed, 36 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 239c8d25..d0cdbc5c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
VERSION = 12.42
NAME = drakconf
-SUBDIRS = po pixmaps polkit/policy #data
+SUBDIRS = po pixmaps polkit #data
localedir = $(DESTDIR)/usr/share/locale
mcc_dir = $(DESTDIR)/usr/share/mcc
SYSCONFDIR = $(DESTDIR)/etc/sysconfig
@@ -18,14 +18,12 @@ drakconf:
cp -l control-center drakconf
clean:
- $(MAKE) -C po $@
- $(MAKE) -C polkit/policy $@
rm -f *~ drakconf core .#*[0-9] core.* *.bak
- for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
+ for d in $(SUBDIRS); do ( make -C $$d $@ ) ; done
install: all
$(MAKE) -C po $@
- $(MAKE) -C polkit/policy $@
+ $(MAKE) -C polkit $@
find -name '*.p[lm]' -o -name control-center -o -name drakconf | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
install -d $(DESTDIR)/usr/{bin,sbin,libexec,share/icons}
install -d $(mcc_dir)/themes/default/
@@ -35,7 +33,6 @@ install: all
install -m755 menus_launcher.pl $(DESTDIR)/usr/sbin/
install -m755 print_launcher.pl $(DESTDIR)/usr/sbin/
install -m755 drakxconf $(DESTDIR)/usr/libexec/
- install -m755 polkit/wrappers/drakxconf $(DESTDIR)/usr/bin
install -m755 drakconsole $(DESTDIR)/usr/sbin/
install -m755 mdkwebadmin.pl $(DESTDIR)/usr/bin/
for d in $(SUBDIRS); do ( cd $$d ; make $@ ) ; done
diff --git a/NEWS b/NEWS
index 42656b9d..4409fe6f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
-- Remove drakvirt from mcc (#4706)
+- tidy up polkit support
+- Remove drakvirt from mcc (mga#4706)
Version 12.42 - 5 September 2013 Colin Guthrie
diff --git a/po/Makefile b/po/Makefile
index 55d8d67a..6e9665e0 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -35,7 +35,7 @@ clean:
msgfmt -o $@ $<
POTFILES.in:
- (cd .. ; /bin/ls -1 data/*.desktop.in data/*.directory.in *.desktop.in polkit/policy/*.in) > POTFILES.in
+ (cd .. ; /bin/ls -1 data/*.desktop.in data/*.directory.in *.desktop.in polkit/*.policy.in) > POTFILES.in
$(PGOAL).pot: $(PL_FILES) POTFILES.in
intltool-update --gettext-package non-perl --pot
diff --git a/polkit/Makefile b/polkit/Makefile
new file mode 100644
index 00000000..4c379cd8
--- /dev/null
+++ b/polkit/Makefile
@@ -0,0 +1,26 @@
+BINDIR = /usr/bin
+LIBEXECDIR = /usr/libexec
+BINDEST = $(DESTDIR)$(BINDIR)
+POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
+
+POLICY_IN := $(wildcard *.policy.in)
+POLICY = $(POLICY_IN:.policy.in=.policy)
+WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY))
+# Hack for custom wrapper for drakconf
+WRAPPERS = drakxconf
+
+all: $(WRAPPERS) $(POLICY)
+
+clean:
+ rm -f $(WRAPPERS) $(POLICY)
+
+%: org.mageia.%.policy.in
+ @echo -e "#!/bin/sh\nexec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@
+
+%.policy: %.policy.in
+ intltool-merge --utf8 ../po $< $@ -x -u -c ../po/.intltool-merge-cache
+
+install: all
+ install -d $(BINDEST) $(POLKITPOLICYDEST)
+ install -m755 $(WRAPPERS) $(BINDEST)
+ install -m644 $(POLICY) $(POLKITPOLICYDEST)
diff --git a/polkit/policy/org.mageia.control-centre-gui.policy.in b/polkit/org.mageia.drakconf.policy.in
index 958ca7a6..1fc2a36a 100644
--- a/polkit/policy/org.mageia.control-centre-gui.policy.in
+++ b/polkit/org.mageia.drakconf.policy.in
@@ -4,10 +4,10 @@
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
- <vendor>Mageia Control Centre GUI</vendor>
+ <vendor>Mageia</vendor>
<vendor_url>http://mageia.org/control-centre-gui</vendor_url>
- <action id="org.mageia.control-centre-gui.pkexec.run">
+ <action id="org.mageia.drakconf.pkexec.run">
<_description>Run Mageia Control Centre GUI</_description>
<_message>Authentication is required to run Mageia Control Centre GUI</_message>
<icon_name>drakconf</icon_name>
diff --git a/polkit/policy/org.mageia.control-centre.policy.in b/polkit/org.mageia.drakxconf.policy.in
index 4772b0fc..c4f63791 100644
--- a/polkit/policy/org.mageia.control-centre.policy.in
+++ b/polkit/org.mageia.drakxconf.policy.in
@@ -4,10 +4,10 @@
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
- <vendor>Mageia Control Centre</vendor>
+ <vendor>Mageia</vendor>
<vendor_url>http://mageia.org/control-centre</vendor_url>
- <action id="org.mageia.control-centre.pkexec.run">
+ <action id="org.mageia.drakxconf.pkexec.run">
<_description>Run Mageia Control Centre</_description>
<_message>Authentication is required to run Mageia Control Centre</_message>
<icon_name>drakconf</icon_name>
diff --git a/polkit/wrappers/drakxconf b/polkit/wrappers/drakxconf
deleted file mode 100755
index db38e46a..00000000
--- a/polkit/wrappers/drakxconf
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/pkexec /usr/libexec/drakxconf