|
From: Christopher D. M. <cas...@us...> - 2012-02-29 16:58:30
|
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 15babbd57a532cdb3cfb058d092497501dccd9ec (commit)
from 35c14d1b9667e8ea8b9daf68b374a64b1d625f56 (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 15babbd57a532cdb3cfb058d092497501dccd9ec
Author: CDM <cas...@us...>
Date: Wed Feb 29 09:57:18 2012 -0700
CDM: add profile scripts to install that only modify the environment if the install is in a non-standard location
-----------------------------------------------------------------------
Summary of changes:
cap.spec | 3 ++
build.sh => etc/profile.d/cap.csh | 43 +++++++++++-------------------------
build.sh => etc/profile.d/cap.sh | 41 +++++++++++------------------------
install.sh | 19 +++++++++++++---
src/make.workbench | 2 +-
src/modules/Makefile | 17 ++++++++++++++
6 files changed, 62 insertions(+), 63 deletions(-)
copy build.sh => etc/profile.d/cap.csh (50%)
mode change 100755 => 100644
copy build.sh => etc/profile.d/cap.sh (51%)
mode change 100755 => 100644
create mode 100644 src/modules/Makefile
diff --git a/cap.spec b/cap.spec
index b4749b4..0e03c22 100644
--- a/cap.spec
+++ b/cap.spec
@@ -95,6 +95,7 @@ Authors:
%files
%defattr(-,root,root)
+%{_cap_home}/etc/*
%{_cap_home}/src/*
%{_cap_home}/share/doc/*
%{_cap_home}/bin/*
@@ -103,6 +104,8 @@ Authors:
/usr/libexec/cap4
/usr/src/cap4
/usr/bin/deploy
+/etc/profile.d/cap.sh
+/etc/profile.d/cap.csh
#%config(noreplace) %{_capconf_home}/sysconfig/cap
#%config(noreplace) %{_capconf_home}/profile.d/cap.csh
#%config(noreplace) %{_capconf_home}/profile.d/cap.sh
diff --git a/build.sh b/etc/profile.d/cap.csh
old mode 100755
new mode 100644
similarity index 50%
copy from build.sh
copy to etc/profile.d/cap.csh
index 5ac1188..db49656
--- a/build.sh
+++ b/etc/profile.d/cap.csh
@@ -1,15 +1,14 @@
-#!/bin/bash
-############################################################################
-# Name: build
-# File: build.sh
-# Purpose: build perl doc man pages
+#############################################################################
+# Name: cap.csh
+# File: cap.csh
+# Purpose: profile script for cap (tcsh and csh style)
# Bug Reports: cap4-devel_AT_lists_DOT_sf_DOT_net
#
-# Last Changed:
-# $Id: build.sh 1138 2007-11-12 16:32:33Z jatencio $
+# Last Modified:
+# $Id: cap.csh 1054 2007-09-05 13:48:25Z cashmont $
#
# Copyright:
-# © Copyright 2006, 2007,2012 Hewlett-Packard Development Company, L.P
+# © Copyright 2006, 2007, 2012 Hewlett-Packard Development Company, L.P
#
# License: GPL v2
# This program is free software; you can redistribute it and/or modify
@@ -27,25 +26,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################
-BUILD_ROOT=$1
-exit
-
-# Build the man pages commands
-#find usr/bin usr/sbin -type f -exec perldoc -d{}.1 -oman {} \;
-#find usr/bin usr/sbin -type f -name *.1 -exec gzip -9 {} \;
-
-#
-# change permissions properly
-#
-#find usr/bin usr/sbin usr/libexec/drivers -exec chmod a+rx {} \;
-#mkdir -p usr/share/man/man1
-#mv usr/bin/*.gz usr/sbin/*.gz usr/share/man/man1
-
-# Build the man pages perl modules and cli drivers
-#find usr/libexec -name '*.p?' -exec perldoc -d{}.3 -oman {} \;
-
-# move libexec drivers to man3
-#mkdir -p usr/share/man/man3
-#find usr/libexec -name '*.3' -exec gzip -9 {} \;
-#find usr/libexec -name '*.gz' -exec mv {} usr/share/man/man3/ \; -print
-
+# if cap is installed in system level directories, it should be in our path already,
+CAPHOME=SYSTEM
+if ( $CAPHOME != "SYSTEM" ) then
+ setenv PATH $CAPHOME/bin:$PATH
+ setenv MANPATH $CAPHOME/man:$MANPATH
+endif
diff --git a/build.sh b/etc/profile.d/cap.sh
old mode 100755
new mode 100644
similarity index 51%
copy from build.sh
copy to etc/profile.d/cap.sh
index 5ac1188..d9d9c68
--- a/build.sh
+++ b/etc/profile.d/cap.sh
@@ -1,15 +1,14 @@
-#!/bin/bash
-############################################################################
-# Name: build
-# File: build.sh
-# Purpose: build perl doc man pages
+#############################################################################
+# Name: cap.sh
+# File: cap.sh
+# Purpose: profile script for cap (sh, ksh and bash style)
# Bug Reports: cap4-devel_AT_lists_DOT_sf_DOT_net
#
-# Last Changed:
-# $Id: build.sh 1138 2007-11-12 16:32:33Z jatencio $
+# Last Modified:
+# $Id: cap.sh 1054 2007-09-05 13:48:25Z cashmont $
#
# Copyright:
-# © Copyright 2006, 2007,2012 Hewlett-Packard Development Company, L.P
+# © Copyright 2006, 2007, 2012 Hewlett-Packard Development Company, L.P
#
# License: GPL v2
# This program is free software; you can redistribute it and/or modify
@@ -27,25 +26,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################
-BUILD_ROOT=$1
-exit
-
-# Build the man pages commands
-#find usr/bin usr/sbin -type f -exec perldoc -d{}.1 -oman {} \;
-#find usr/bin usr/sbin -type f -name *.1 -exec gzip -9 {} \;
-
-#
-# change permissions properly
-#
-#find usr/bin usr/sbin usr/libexec/drivers -exec chmod a+rx {} \;
-#mkdir -p usr/share/man/man1
-#mv usr/bin/*.gz usr/sbin/*.gz usr/share/man/man1
-
-# Build the man pages perl modules and cli drivers
-#find usr/libexec -name '*.p?' -exec perldoc -d{}.3 -oman {} \;
+# if cap is installed in system level directories, it should be in our path already,
+CAPHOME=SYSTEM
+if [ $CAPHOME != "SYSTEM" ]; then
+ export PATH=$CAPHOME/bin:$PATH
+ export MANPATH=$CAPHOME/man:$MANPATH
+fi
-# move libexec drivers to man3
-#mkdir -p usr/share/man/man3
-#find usr/libexec -name '*.3' -exec gzip -9 {} \;
-#find usr/libexec -name '*.gz' -exec mv {} usr/share/man/man3/ \; -print
diff --git a/install.sh b/install.sh
index eb934d9..a2f26c5 100755
--- a/install.sh
+++ b/install.sh
@@ -28,14 +28,10 @@
############################################################################
#set -x
-#pwd
BUILD_ROOT=$1
# place stuff in /opt/cap4 and softlink to it from standard space instead
_cap_home=$2
-#_capconf_home=/etc
-#_capdb_home=/var/lib/cap
-#_cap_workorder_home=/var/spool/cap
[ $# -lt 1 ] && echo "$0 BUILD_ROOT _cap_home" && exit 1
[ "x${_cap_home}" = "x" ] && _cap_home=/opt/cap4
@@ -56,6 +52,10 @@ cp -rp --preserve=link libexec/* ${BUILD_ROOT}/${_cap_home}/libexec/
mkdir -p ${BUILD_ROOT}/${_cap_home}/share/doc
cp -rp --preserve=link doc/* ${BUILD_ROOT}/${_cap_home}/share/doc/
+# etc
+mkdir -p ${BUILD_ROOT}/${_cap_home}/etc
+cp -rp --preserve=link etc/* ${BUILD_ROOT}/${_cap_home}/etc/
+
#
# softlinks from /usr/*/cap4 -> ${_cap_home}/*
#
@@ -67,4 +67,15 @@ mkdir -p ${BUILD_ROOT}/usr/src
ln -sf ${_cap_home}/src ${BUILD_ROOT}/usr/src/cap4
mkdir -p ${BUILD_ROOT}/usr/bin
ln -sf ${_cap_home}/bin/deploy ${BUILD_ROOT}/usr/bin/deploy
+#
+# setup profile links or paths
+#
+mkdir -p ${BUILD_ROOT}/etc/profile.d
+if [ ${_cap_home} != "." ]; then
+ ln -sf ${_cap_home}/etc/profile.d/cap.sh ${BUILD_ROOT}/etc/profile.d/cap.sh
+ ln -sf ${_cap_home}/etc/profile.d/cap.csh ${BUILD_ROOT}/etc/profile.d/cap.csh
+else
+ sed -i -e "s!SYSTEM!${BUILD_ROOT}!g" ${BUILD_ROOT}/${_cap_home}/etc/profile.d/cap.csh
+ sed -i -e "s!SYSTEM!${BUILD_ROOT}!g" ${BUILD_ROOT}/${_cap_home}/etc/profile.d/cap.sh
+fi
diff --git a/src/make.workbench b/src/make.workbench
index 92db9e3..4f86982 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)
+ rm -fr $(TAR) $(SRC) .rpmbuild-$(SRC) .rpmbuild BUILD BUILDROOT RPMS SOURCES SPECS SRPMS .make-$(SRC) src
diff --git a/src/modules/Makefile b/src/modules/Makefile
new file mode 100644
index 0000000..87d398c
--- /dev/null
+++ b/src/modules/Makefile
@@ -0,0 +1,17 @@
+include ../make.def
+
+VERSION=3.2.9
+SUBVERSION=c
+SRC=modules-$(VERSION)
+TAR=$(SRC)$(SUBVERSION).tar.gz
+URL="http://sourceforge.net/projects/modules/files/Modules/$(SRC)/$(TAR)"
+
+$(SRC): $(TAR)
+ $(call print-header,"cap4 untar src $@")
+ $(call untar-src,$(TAR))
+ ln -sf $@ src
+ @[ -d $@ ] && touch $@
+
+.make-$(SRC): $(SRC)
+
+include ../make.workbench
hooks/post-receive
--
cap4
|