aboutsummaryrefslogtreecommitdiffstats
path: root/polkit
diff options
context:
space:
mode:
Diffstat (limited to 'polkit')
-rw-r--r--polkit/Makefile24
-rw-r--r--polkit/org.mageia.isodumper.policy.in8
2 files changed, 24 insertions, 8 deletions
diff --git a/polkit/Makefile b/polkit/Makefile
new file mode 100644
index 0000000..dc7c4ba
--- /dev/null
+++ b/polkit/Makefile
@@ -0,0 +1,24 @@
+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))
+
+all: $(WRAPPERS) $(POLICY)
+
+clean:
+ rm -f $(WRAPPERS) $(POLICY)
+
+%: org.mageia.%.policy.in
+ @echo -e '#!/bin/sh\nif [[ "$$UID" != "0" ]] ; then\n exec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ "$$''@"\nelse\n exec $(LIBEXECDIR)/$@ "$$''@"\nfi\n' > $@
+
+%.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/org.mageia.isodumper.policy.in b/polkit/org.mageia.isodumper.policy.in
index 860749d..749aa6f 100644
--- a/polkit/org.mageia.isodumper.policy.in
+++ b/polkit/org.mageia.isodumper.policy.in
@@ -9,15 +9,7 @@
<action id="org.mageia.isodumper.pkexec.run">
<_description>Run Isodumper</_description>
- <description xml:lang="fr">Exécuter Isodumper</description>
- <description xml:lang="ca">Isodumper</description>
- <description xml:lang="ru">Isodumper</description>
- <description xml:lang="sl">Isodumper</description>
- <description xml:lang="tr">Isodumper</description>
- <description xml:lang="uk">Isodumper</description>
<_message>Authentication is required to run Isodumper</_message>
- <message xml:lang="fr">Une authentification est nécessaire pour exécuter IsoDumper</message>
- <message xml:lang="ca">Per a accedir al Isodumper cal autenticació</message>
<icon_name>isodumper</icon_name>
<defaults>
<allow_any>no</allow_any>