summaryrefslogtreecommitdiffstats
path: root/polkit/Makefile
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-10-12 13:58:57 +0100
committerColin Guthrie <colin@mageia.org>2013-10-12 13:58:57 +0100
commit69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0 (patch)
treec7c5f1f4eb64deccc3ee9692f03c6ad29f14c2b4 /polkit/Makefile
parent3200d574ebf953696986072ba3313c701ae8ac1e (diff)
downloaddrak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.gz
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.bz2
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.tar.xz
drak3d-69cf1f60c7d24c5c4267c69c7b08c80d4d10d5e0.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..34e8106
--- /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\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)