aboutsummaryrefslogtreecommitdiffstats
path: root/polkit/Makefile
diff options
context:
space:
mode:
authorYuri Chornoivan <yurchor@ukr.net>2013-12-23 19:33:01 +0200
committerYuri Chornoivan <yurchor@ukr.net>2013-12-23 19:33:01 +0200
commitd21a459a1cc8ba267d96af1a5cd619ecc937cde8 (patch)
treeb68814124eff7062e9928b415112ddcd573c2713 /polkit/Makefile
parent2e6c8115416714c469b79ba93d3cc6f59b569585 (diff)
downloadisodumper-d21a459a1cc8ba267d96af1a5cd619ecc937cde8.tar
isodumper-d21a459a1cc8ba267d96af1a5cd619ecc937cde8.tar.gz
isodumper-d21a459a1cc8ba267d96af1a5cd619ecc937cde8.tar.bz2
isodumper-d21a459a1cc8ba267d96af1a5cd619ecc937cde8.tar.xz
isodumper-d21a459a1cc8ba267d96af1a5cd619ecc937cde8.zip
Really use translations for polkit file
Diffstat (limited to 'polkit/Makefile')
-rw-r--r--polkit/Makefile24
1 files changed, 24 insertions, 0 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)