]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-33440: Add an 'install.sh' into which we can place commands like 'chkconfig -...
authorDavid Scott <dave.scott@eu.citrix.com>
Fri, 18 Dec 2009 20:48:36 +0000 (20:48 +0000)
committerDavid Scott <dave.scott@eu.citrix.com>
Fri, 18 Dec 2009 20:48:36 +0000 (20:48 +0000)
The script is named by repo currently:
 /etc/xensource/scripts/install/install-xen-api-libs.hg.sh

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Makefile.in
mk/Makefile
rebuild
scripts/Makefile [new file with mode: 0644]
scripts/install.sh [new file with mode: 0644]

index 92ea842de4f5043c227211089d653a0be513a9fd..0cea6669466b3052314d40242c448307010038f5 100644 (file)
@@ -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:
index 74a7b8152911dcc4ca984939de839f39d0ecdda4..2a557e03de39e9ab9c1d16f6bf136fae0923c5a4 100644 (file)
@@ -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 2d0d72bc8b84387aea3fbc60afa554efcebb3830..55d075fdcffd7e40912ec86792a6b1f4be34f1d5 100755 (executable)
--- 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 (file)
index 0000000..8c773ab
--- /dev/null
@@ -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 (file)
index 0000000..a1371ea
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Run after the binaries are unpacked to complete installation
+
+chkconfig --add fe
\ No newline at end of file