summaryrefslogtreecommitdiffstats
path: root/polkit/Makefile
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-10-12 13:20:44 +0100
committerColin Guthrie <colin@mageia.org>2013-10-12 13:23:57 +0100
commitec9747937aafaa91aa04e969ad255899415ba4e4 (patch)
tree133703e814f7ae1b15dfbc6a6723ae1f053a51d3 /polkit/Makefile
parent0aeb6cd9396b3ab4dc52a7d330ca5484545b9c58 (diff)
downloaddrakx-net-ec9747937aafaa91aa04e969ad255899415ba4e4.tar
drakx-net-ec9747937aafaa91aa04e969ad255899415ba4e4.tar.gz
drakx-net-ec9747937aafaa91aa04e969ad255899415ba4e4.tar.bz2
drakx-net-ec9747937aafaa91aa04e969ad255899415ba4e4.tar.xz
drakx-net-ec9747937aafaa91aa04e969ad255899415ba4e4.zip
polkit: Tidy up polkit support
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..b996120
--- /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\n$(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)