fence-agents/0001-Fix-install-issue-for-symlinked-agents.patch
Oyvind Albrigtsen 15ba3df6a7 - new upstream release
- new package fence-agents-amt-ws
- new package fence-agents-compute
- new package fence-agents-drac
- new package fence-agents-hds-cb
- new package fence-agents-mpath
- new package fence-agents-sanbox2
- new package fence-agents-sbd
- new package fence-agents-vbox
- new package fence-agents-vmware
- new package fence-agents-xenapi
2016-07-12 13:36:34 +02:00

46 lines
1.5 KiB
Diff

From df5492f2dea1ff880308f6daf7043f3159aa4a89 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Tue, 5 Jul 2016 14:33:43 +0200
Subject: [PATCH] Fix install issue for symlinked agents
---
make/fencebuild.mk | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/make/fencebuild.mk b/make/fencebuild.mk
index 1d50398..f11aa8a 100644
--- a/make/fencebuild.mk
+++ b/make/fencebuild.mk
@@ -47,3 +47,28 @@ clean: clean-man
fi
clean-local: clean
+
+install-exec-hook: $(TARGET)
+ if [ -n "$(man8dir)" ]; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+ fi
+ for p in $(TARGET); do \
+ dir=`dirname $$p`; \
+ for x in `PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"`; do \
+ echo " $(INSTALL_SCRIPT) $$dir/$$x '$(DESTDIR)$(sbindir)'"; \
+ $(INSTALL_SCRIPT) $$dir/$$x "$(DESTDIR)$(sbindir)" || exit $$?; \
+ echo " $(INSTALL_DATA) '$$dir/$$x.8' '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) "$$dir/$$x.8" "$(DESTDIR)$(man8dir)" || exit $$?; \
+ done; \
+ done
+
+uninstall-hook: $(TARGET)
+ files=`for p in $(TARGET); do \
+ for x in \`PYTHONPATH=$(abs_srcdir)/lib:$(abs_builddir)/lib $(PYTHON) $$p -o metadata | grep symlink | sed -e "s/.*\(fence.*\)\" .*/\1/g"\`; do \
+ echo " rm -f '$(DESTDIR)$(sbindir)/$$x'"; \
+ rm -f "$(DESTDIR)$(sbindir)/$$x"; \
+ echo " rm -f '$(DESTDIR)$(man8dir)/$$x.8'"; \
+ rm -f "$(DESTDIR)$(man8dir)/$$x.8"; \
+ done; \
+ done`
--
2.7.4