diff options
author | Colin Guthrie <colin@mageia.org> | 2013-10-11 09:56:29 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-10-11 09:56:29 +0100 |
commit | acdd74d9e1994edab0902a51d353e799ea6097bd (patch) | |
tree | 5d73b54edbe91482a89b328ce014f1becd855714 /perl-install/standalone/polkit/policy/Makefile | |
parent | b2ec52097de142ba7637ccdf6c81cefb3d362642 (diff) | |
download | drakx-acdd74d9e1994edab0902a51d353e799ea6097bd.tar drakx-acdd74d9e1994edab0902a51d353e799ea6097bd.tar.gz drakx-acdd74d9e1994edab0902a51d353e799ea6097bd.tar.bz2 drakx-acdd74d9e1994edab0902a51d353e799ea6097bd.tar.xz drakx-acdd74d9e1994edab0902a51d353e799ea6097bd.zip |
polkit: Generate wrapper scripts automatically from policy files.
This relies on the name of the policy files but that's fine.
We no longer need to write lots of boiler plate wrapper scripts.
mga#11125
Diffstat (limited to 'perl-install/standalone/polkit/policy/Makefile')
-rw-r--r-- | perl-install/standalone/polkit/policy/Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/perl-install/standalone/polkit/policy/Makefile b/perl-install/standalone/polkit/policy/Makefile index 09ce27564..b6860a8ec 100644 --- a/perl-install/standalone/polkit/policy/Makefile +++ b/perl-install/standalone/polkit/policy/Makefile @@ -1,16 +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: $(POLICY) +all: $(WRAPPERS) $(POLICY) clean: - rm -f $(POLICY) + rm -f $(WRAPPERS) $(POLICY) -install: all - install -d $(POLKITPOLICYDEST) - install -m644 $(POLICY) $(POLKITPOLICYDEST) +%: org.mageia.%.policy.in + @echo -e "#!/bin/sh\n$(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@ -%.policy: %.policy.in +%.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) |