summaryrefslogtreecommitdiffstats
path: root/polkit/Makefile
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-10-12 15:20:51 +0100
committerColin Guthrie <colin@mageia.org>2013-10-12 15:26:23 +0100
commitcae1f59f7459a136cf52ae3a868b8733ef8c0e80 (patch)
treebc16410a5ae43825ccd734d2baef8d9732a52e41 /polkit/Makefile
parentc61197a3984f8975fa9fd9a3f0cabe05206c1cb9 (diff)
downloadmgaonline-cae1f59f7459a136cf52ae3a868b8733ef8c0e80.tar
mgaonline-cae1f59f7459a136cf52ae3a868b8733ef8c0e80.tar.gz
mgaonline-cae1f59f7459a136cf52ae3a868b8733ef8c0e80.tar.bz2
mgaonline-cae1f59f7459a136cf52ae3a868b8733ef8c0e80.tar.xz
mgaonline-cae1f59f7459a136cf52ae3a868b8733ef8c0e80.zip
Use polkit for authorisation (mga#11125)
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 00000000..a8b5a51d
--- /dev/null
+++ b/polkit/Makefile
@@ -0,0 +1,24 @@
+BINDIR = /usr/bin
+LIBEXECDIR = /usr/libexec
+BINDEST = $(PREFIX)$(BINDIR)
+POLKITPOLICYDEST = $(PREFIX)/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\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)