From: David Scott Date: Fri, 18 Dec 2009 20:48:36 +0000 (+0000) Subject: CA-33440: Add an 'install.sh' into which we can place commands like 'chkconfig -... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=47438a0de26a29c45bfc67a6663da3f5682ae17c;p=xcp%2Fxen-api-libs.git CA-33440: Add an 'install.sh' into which we can place commands like 'chkconfig --add fe'. Eventually we can trigger this from a proper package post-install script. The script is named by repo currently: /etc/xensource/scripts/install/install-xen-api-libs.hg.sh Signed-off-by: David Scott --- diff --git a/Makefile.in b/Makefile.in index 92ea842..0cea666 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,6 +124,7 @@ bininstall: $(MAKE) -C stdext bininstall $(MAKE) -C close-and-exec bininstall $(MAKE) -C forking_executioner bininstall + $(MAKE) -C scripts bininstall binuninstall: $(MAKE) -C pciutil binuninstall @@ -132,6 +133,7 @@ binuninstall: $(MAKE) -C stdext binuninstall $(MAKE) -C close-and-exec binuninstall $(MAKE) -C forking_executioner binuninstall + $(MAKE) -C scripts binuninstall .PHONY: doc doc: diff --git a/mk/Makefile b/mk/Makefile index 74a7b81..2a557e0 100644 --- a/mk/Makefile +++ b/mk/Makefile @@ -34,7 +34,7 @@ $(OUTPUT_API_PKG): $(OUTPUT_API_DEVEL_PKG) mkdir -p $(MY_MAIN_PACKAGES) (cd $(REPO) && sh autogen.sh && ./configure) $(MAKE) -C $(REPO) bins - $(MAKE) -C $(REPO) DESTDIR=$(STAGING) bininstall + $(MAKE) -C $(REPO) DESTDIR=$(STAGING) REPO=$(REPO) bininstall tar -C $(STAGING) -jcf $@ . $(OUTPUT_XAPI_DEVEL_PKG): diff --git a/rebuild b/rebuild index 2d0d72b..55d075f 100755 --- a/rebuild +++ b/rebuild @@ -1,5 +1,7 @@ #!/bin/sh +export REPO=/myrepos/xen-api-libs.hg + set -e make clean; make cleanxen; make uninstall; make uninstallxen; make binuninstall diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 0000000..8c773ab --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,13 @@ +IPROG=install -m 755 -o root -g root + +SCRIPTS=/etc/xensource/scripts/install + +REPO_SUFFIX:=$(shell basename "${REPO}") + +.PHONY: bininstall +bininstall: + mkdir -p $(DESTDIR)$(SCRIPTS) + $(IPROG) install.sh $(DESTDIR)$(SCRIPTS)/install-$(REPO_SUFFIX).sh + +.PHONY: binuninstall + rm -f $(DESTDIR)$(SCRIPTS)/install-$(REPO_SUFFIX).sh diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100644 index 0000000..a1371ea --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# Run after the binaries are unpacked to complete installation + +chkconfig --add fe \ No newline at end of file