[ewg] PATCH[2/2] Add stgt to build_ofed build_ofed

Doron Shoham dorons at voltaire.com
Tue Jul 15 02:55:59 PDT 2008


Add stgt to the build_ofed script

Signed-off-by: Doron Shoham <dorons at voltaire.com>
---
 build_ofed.sh |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/build_ofed.sh b/build_ofed.sh
index 482e7a2..a85a47f 100755
--- a/build_ofed.sh
+++ b/build_ofed.sh
@@ -106,6 +106,9 @@ open_iscsi_branch="ofed_1_3"
 open_iscsi_RH4_URL="git://git.openfabrics.org/~dorons/open-iscsi-rh4.git"
 open_iscsi_RH4_branch="ofed_1_3"
 
+tgt_URL="git://git.openfabrics.org/~dorons/tgt.git"
+tgt_branch="ofed_1_4"
+
 bonding_URL="http://www.openfabrics.org/~monis/ofed_1_3"
 
 rds_tools_URL="http://www.openfabrics.org/~vlad/ofed_1_3/rds-tools"
@@ -468,6 +471,33 @@ get_open_iscsi()
     build_single_open_iscsi_srpm $open_iscsi_RH4_URL $open_iscsi_RH4_branch
 }
 
+get_tgt()
+{
+    echo Building tgt source RPMs
+
+    cd ${tmpdir}
+    rm -rf tgt
+    ex git clone --bare ${tgt_URL} tgt/.git
+    cd tgt
+
+    case $git_version in
+        1.[5-9].[3-9]*)
+        perl -ni -e "s/(bare = ).*/\${1}false/;print" .git/config
+        ;;
+    esac
+    ex git checkout -f ${tgt_branch}
+
+    mkdir -p topdir/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+    ex tar czf topdir/SOURCES/tgt-generic.tar.bz2 tgt-generic
+    ex cp tgt.spec topdir/SPECS
+
+    set -x
+    rpmbuild -bs --define "_topdir ${tmpdir}/tgt/topdir" ${tmpdir}/tgt/topdir/SPECS/tgt.spec
+    set +x
+    ex cp -a topdir/SRPMS/tgt-generic* ${CWD}/${PACKAGE}-${PACKAGE_VERSION}/SRPMS/
+    cd ${tmpdir}
+    ex rm -rf  tgt
+}
 get_bonding()
 {
     echo Building bonding source RPM
@@ -653,6 +683,9 @@ main()
         # Get oiscsi patch packages
         get_open_iscsi
         
+	# Get tgt package
+	get_tgt
+
        # Get bonding RPM
         get_bonding
 
-- 
1.5.3.8





More information about the ewg mailing list