Author: jfrederic.clere(a)jboss.com
Date: 2007-12-12 11:53:28 -0500 (Wed, 12 Dec 2007)
New Revision: 1186
Added:
trunk/build/unix/util/builddep.sh
Modified:
trunk/build/unix/build.sh
Log:
Add a list of depencies. (Of the libraries of the built package)
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-12-12 09:40:21 UTC (rev 1185)
+++ trunk/build/unix/build.sh 2007-12-12 16:53:28 UTC (rev 1186)
@@ -143,7 +143,7 @@
export patch
# Read apr and openssl version.
-parg=`grep -v '^#' ${package_list} | grep "^$PACKAGE|" | grep
$build_version`
+parg=`grep -v '^#' ${package_list} | grep "^$PACKAGE|" | grep
"|$build_version|"`
apr_version=`echo "${parg}" | ${awk} -F'|' '{print $3}'`
apu_version=`echo "${parg}" | ${awk} -F'|' '{print $4}'`
api_version=`echo "${parg}" | ${awk} -F'|' '{print $5}'`
@@ -277,16 +277,18 @@
# # $1=script $2..n
override()
{
+ basedir=`dirname $1`
cmd=`basename $1 .sh`
- if [ -x ${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh ]; then
+ if [ -x ${basedir}/${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh ]; then
run=${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh
- elif [ -x ${cmd}.${BUILD_SYS}.sh ]; then
+ elif [ -x ${basedir}/${cmd}.${BUILD_SYS}.sh ]; then
run=${cmd}.${BUILD_SYS}.sh
else
run=${cmd}.sh
fi
shift
- ./$run $@
+ echo "Running ${basedir}/$run $@"
+ ${basedir}/$run $@
if [ $? -eq 2 ]; then
echo "$run not supported on this platform"
exit 0
@@ -757,3 +759,6 @@
(cd ${package_src_dir}
buildbin $build_output_dir
)
+
+# generate a list of dependencies
+override ${build_top}/util/builddep $build_output_dir
${PACKAGE}.${build_version}.${BUILD_SYS}.${BUILD_CPU}.depends
Added: trunk/build/unix/util/builddep.sh
===================================================================
--- trunk/build/unix/util/builddep.sh (rev 0)
+++ trunk/build/unix/util/builddep.sh 2007-12-12 16:53:28 UTC (rev 1186)
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright(c) 2007 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+
+# Download the sources. It guess how to do it.
+# $1: binary build directory.
+# $2: ouput file.
+LD_LIBRARY_PATH=$1
+for dir in `find $1 -name "*.${so_extension}" -exec dirname {} \;`
+do
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$dir
+done
+echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH
+
+find $1 -name "*.${so_extension}" -exec ldd {} \; > $2.all
+cat $2.all | awk 'NF==4 { print $3 } ' | sort -u | grep -v "$1" >
$2
+> $2.tmp
+for file in `cat $2`
+do
+ rpm -qf $file >> $2.tmp
+done
+sort -u $2.tmp > $2.pkg
Property changes on: trunk/build/unix/util/builddep.sh
___________________________________________________________________
Name: svn:executable
+ *
Show replies by date