[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/7] remote: Define polkit{actions,rules}dir



Avoid building the same path several times.

Signed-off-by: Andrea Bolognani <abologna redhat com>
---
 src/remote/Makefile.inc.am | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 04a2ec8cc0..d9f559dce5 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -207,21 +207,22 @@ uninstall-sysctl:
 endif ! WITH_SYSCTL
 
 if WITH_POLKIT
-policydir = $(datadir)/polkit-1/actions
+polkitactionsdir = $(datadir)/polkit-1/actions
+polkitrulesdir = $(datadir)/polkit-1/rules.d
 
 install-polkit::
-	$(MKDIR_P) $(DESTDIR)$(policydir)
+	$(MKDIR_P) $(DESTDIR)$(polkitactionsdir)
 	$(INSTALL_DATA) $(srcdir)/remote/libvirtd.policy \
-		$(DESTDIR)$(policydir)/org.libvirt.unix.policy
-	$(MKDIR_P) $(DESTDIR)$(datadir)/polkit-1/rules.d
+		$(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
+	$(MKDIR_P) $(DESTDIR)$(polkitrulesdir)
 	$(INSTALL_DATA) $(srcdir)/remote/libvirtd.rules \
-		$(DESTDIR)$(datadir)/polkit-1/rules.d/50-libvirt.rules
+		$(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
 
 uninstall-polkit::
-	rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
-	rmdir $(DESTDIR)$(policydir) || :
-	rm -f $(DESTDIR)$(datadir)/polkit-1/rules.d/50-libvirt.rules
-	rmdir $(DESTDIR)$(datadir)/polkit-1/rules.d || :
+	rm -f $(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
+	rmdir $(DESTDIR)$(polkitactionsdir) || :
+	rm -f $(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
+	rmdir $(DESTDIR)$(polkitrulesdir) || :
 
 else ! WITH_POLKIT
 install-polkit::
-- 
2.20.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]