|
From: Christopher D. M. <cas...@us...> - 2012-02-29 20:01:26
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "cap4".
The branch, master has been updated
via 7eaddd44c21676bccbb51c7a27b1620a8a4524d6 (commit)
via f41346e70065bf122faca51af7201b718f16ed37 (commit)
from b91876d58ddbface949852383ec43be0891d0ef9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7eaddd44c21676bccbb51c7a27b1620a8a4524d6
Author: CDM <cas...@us...>
Date: Wed Feb 29 13:00:09 2012 -0700
CDM: make deploy actually call make properly
commit f41346e70065bf122faca51af7201b718f16ed37
Author: CDM <cas...@us...>
Date: Wed Feb 29 11:45:11 2012 -0700
CDM: some function fixes to call
-----------------------------------------------------------------------
Summary of changes:
deploy | 15 +++++++++------
etc/profile.d/cap.csh | 3 ++-
etc/profile.d/cap.sh | 1 +
libexec/sh/cfunc | 28 ++++++++++++++++------------
src/make.def | 1 +
src/make.workbench | 2 +-
src/modules/Makefile | 16 ++++++++++++++--
7 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/deploy b/deploy
index d16fdbe..3e75e68 100755
--- a/deploy
+++ b/deploy
@@ -27,14 +27,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
################################################################################
-#set -x
-[ ! -f /usr/libexec/cap4/sh/cfunc ] && [ "x${CAPDEVHOME}" = "x" ] && echo "Missing cfunc library" && exit 1
-[ "x${CAPDEVHOME}" != "x" ] && [ ! -f ${CAPDEVHOME}/libexec/sh/cfunc ] && echo "Missing cfunc library" && exit 1
-
-[ [ -f /usr/libexec/cap4/sh/cfunc ] && . /usr/libexec/cap4/sh/cfunc ] ||
-[ [ "x${CAPDEVHOME}" != "x" ] && [ -f ${CAPDEVHOME}/libexec/sh/cfunc ] echo "Using development cfunc library in $CAPDEVHOME" && . ${CAPDEVHOME}/libexec/sh/cfunc ]
+if [ -f /usr/libexec/cap4/sh/cfunc ]; then
+ . /usr/libexec/cap4/sh/cfunc
+else
+ # CAPHOME defined and if defined is there a cfunc library
+ [ "x${CAPHOME}" = "x" ] ||
+ [ "x${CAPHOME}" != "x" -a ! -f ${CAPHOME}/libexec/sh/cfunc ] &&
+ echo "Missing cfunc library" && exit 1
+ . ${CAPHOME}/libexec/sh/cfunc
+fi
usage() {
echo $0 --tool TOOLNAME --rpm
diff --git a/etc/profile.d/cap.csh b/etc/profile.d/cap.csh
index a2ba686..76b6b4f 100644
--- a/etc/profile.d/cap.csh
+++ b/etc/profile.d/cap.csh
@@ -27,8 +27,9 @@
############################################################################
# if cap is installed in system level directories, it should be in our path already,
-CAPHOME=INSERT_CAPHOME_HERE
+set CAPHOME=INSERT_CAPHOME_HERE
if ( $CAPHOME != "SYSTEM" ) then
+ setenv CAPHOME $CAPHOME
setenv PATH $CAPHOME/bin:$PATH
setenv MANPATH $CAPHOME/man:$MANPATH
endif
diff --git a/etc/profile.d/cap.sh b/etc/profile.d/cap.sh
index 20ac733..fc261e7 100644
--- a/etc/profile.d/cap.sh
+++ b/etc/profile.d/cap.sh
@@ -29,6 +29,7 @@
# if cap is installed in system level directories, it should be in our path already,
CAPHOME=INSERT_CAPHOME_HERE
if [ $CAPHOME != "SYSTEM" ]; then
+ export CAPHOME
export PATH=$CAPHOME/bin:$PATH
export MANPATH=$CAPHOME/man:$MANPATH
fi
diff --git a/libexec/sh/cfunc b/libexec/sh/cfunc
index 1ed5d98..19749f5 100755
--- a/libexec/sh/cfunc
+++ b/libexec/sh/cfunc
@@ -28,10 +28,6 @@
#
################################################################################
-# $$$$$$$$$$$$$$$$$$
-# begin main program
-# $$$$$$$$$$$$$$$$$$
-
RPM=0
parsecli() {
@@ -63,8 +59,8 @@ parsecli() {
}
check_validvar() {
- [ $# -lt 1 ] && echo "VARIABLE_NAME VARIABLE_VALUE" && exit 1
- [ "x${2}" = "x" ] && echo "Undefined VARIABLE ${1}" && exit 1
+ [ $# -lt 1 ] && echo "VARIABLE_NAME VARIABLE_VALUE" && usage
+ [ "x${2}" = "x" ] && echo "Undefined VARIABLE ${1}" && usage
}
cinfo() {
@@ -79,17 +75,25 @@ make_tool() {
local tool=$1
shift
- [ [ ! -d /usr/src/cap4/$tool ] && [ "x${CAPHOME}" = "x" ] ] && \
- [ [ "x${CAPDEVHOME}" != "x" ] && [ ! -d ${CAPDEVHOME}/src/make/$tool ] ] && \
- echo "Missing make src for $tool" && exit 1
-
+ if [ -d /usr/src/cap4/${tool} ]; then
+ maketooldir=/usr/src/cap4/${tool}
+ else
+ # CAPHOME defined and if defined is there a tool there library
+ [ "x${CAPHOME}" = "x" ] ||
+ [ "x${CAPHOME}" != "x" -a ! -d ${CAPHOME}/src/${tool} ] &&
+ echo "Missing make directory src for $tool" && exit 1
+ maketooldir=${CAPHOME}/src/${tool}
+ fi
- if [ $RPM -eq 1 -a $2 ]; then
+ if [ $RPM -eq 1 -a "x${PREFIX}" != "x" ]; then
echo "UNDER DEVELOPMENT: make_tool called with a prefix for rpm"
exit 1
elif [ $RPM -eq 1 ]; then
- make -C
+ make -C $maketooldir rpm
+ else
+ make -C $maketooldir distclean
+ PREFIX=$PREFIX make -C $maketooldir install
fi
}
diff --git a/src/make.def b/src/make.def
index e95541e..da02fa5 100644
--- a/src/make.def
+++ b/src/make.def
@@ -1,4 +1,5 @@
# functions taken from cbench make.def
+PREFIX ?= /usr/local
# downlad a url with wget
define download-wget-url
diff --git a/src/make.workbench b/src/make.workbench
index 4f86982..f0086a5 100644
--- a/src/make.workbench
+++ b/src/make.workbench
@@ -26,5 +26,5 @@ rpmstatus:
clean distclean:
$(call print-header,"cap4 src $@ $(SRC)")
- rm -fr $(TAR) $(SRC) .rpmbuild-$(SRC) .rpmbuild BUILD BUILDROOT RPMS SOURCES SPECS SRPMS .make-$(SRC) src
+ rm -fr $(TAR) $(SRC) .rpmbuild-$(SRC) .rpmbuild BUILD BUILDROOT RPMS SOURCES SPECS SRPMS .make-$(SRC) .configure-$(SRC) src
diff --git a/src/modules/Makefile b/src/modules/Makefile
index 87d398c..70ba9a0 100644
--- a/src/modules/Makefile
+++ b/src/modules/Makefile
@@ -7,11 +7,23 @@ TAR=$(SRC)$(SUBVERSION).tar.gz
URL="http://sourceforge.net/projects/modules/files/Modules/$(SRC)/$(TAR)"
$(SRC): $(TAR)
- $(call print-header,"cap4 untar src $@")
+ $(call print-header,"cap4 src untar $@")
$(call untar-src,$(TAR))
ln -sf $@ src
@[ -d $@ ] && touch $@
-.make-$(SRC): $(SRC)
+.configure-$(SRC): $(SRC)
+ $(call print-header,"cap4 src configure $(SRC) for $(PREFIX)")
+ cd src && ./configure --prefix=$(PREFIX) > .configure-$(SRC) 2>&1
+ touch $@
+
+.make-$(SRC): .configure-$(SRC)
+ $(call print-header,"cap4 src $@ $(SRC)")
+ make -C src > .make-$(SRC) 2>&1
+ touch $@
+
+install: .make-$(SRC)
+ $(call print-header,"cap4 src $@ $(SRC)")
+ make -C src install > .make-$(SRC) 2>&1
include ../make.workbench
hooks/post-receive
--
cap4
|