diff options
author | Francesc Pinyol Margalef <francesc.pinyol.m@gmail.com> | 2013-12-21 13:37:33 +0100 |
---|---|---|
committer | Francesc Pinyol Margalef <francesc.pinyol.m@gmail.com> | 2013-12-21 13:37:33 +0100 |
commit | 095c6b25885ce3d22eedba8cdb98f1fd7e8708a5 (patch) | |
tree | 5bfc768996b3ddec185abeb02b602b48b14d10db /perl-install/standalone/polkit/Makefile | |
parent | df60191bdbddfa7c8e5bd11a2578aae6740963c0 (diff) | |
parent | f76dc0931e47338aa9c7db257d28e5015d8a2f47 (diff) | |
download | drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.gz drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.bz2 drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.tar.xz drakx-095c6b25885ce3d22eedba8cdb98f1fd7e8708a5.zip |
Merge branch 'master' of git://git.mageia.org/software/drakx
Diffstat (limited to 'perl-install/standalone/polkit/Makefile')
-rw-r--r-- | perl-install/standalone/polkit/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/standalone/polkit/Makefile b/perl-install/standalone/polkit/Makefile index a8b5a51da..6cd42c013 100644 --- a/perl-install/standalone/polkit/Makefile +++ b/perl-install/standalone/polkit/Makefile @@ -1,8 +1,10 @@ BINDIR = /usr/bin LIBEXECDIR = /usr/libexec BINDEST = $(PREFIX)$(BINDIR) +POLKITRULESDEST = $(PREFIX)/usr/share/polkit-1/rules.d POLKITPOLICYDEST = $(PREFIX)/usr/share/polkit-1/actions +RULES := $(wildcard *.rules) POLICY_IN := $(wildcard *.policy.in) POLICY = $(POLICY_IN:.policy.in=.policy) WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY)) @@ -13,12 +15,13 @@ clean: rm -f $(WRAPPERS) $(POLICY) %: org.mageia.%.policy.in - @echo -e "#!/bin/sh\nexec $(BINDIR)/pkexec $(LIBEXECDIR)/$@ $$""*" > $@ + @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 -d $(BINDEST) $(POLKITRULESDEST) $(POLKITPOLICYDEST) install -m755 $(WRAPPERS) $(BINDEST) install -m644 $(POLICY) $(POLKITPOLICYDEST) + install -m644 $(RULES) $(POLKITRULESDEST) |