- Update pdebuild and package-build patch to include -z option.

This commit is contained in:
Andrew Overholt 2008-12-15 17:32:26 +00:00
parent 272a7ecd16
commit 15a32e55c9
3 changed files with 71 additions and 30 deletions

View File

@ -6,10 +6,10 @@ RCS file: templates/package-build/prepare-build-dir.sh
diff -N templates/package-build/prepare-build-dir.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ templates/package-build/prepare-build-dir.sh 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,96 @@
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+if [ $# -lt 2 ]; then
+if [ $# -lt 2 ]; then
+ echo "usage: $0 <path to source dir> <path to build dir>"
+ exit 1
+fi
@ -43,7 +43,7 @@ diff -N templates/package-build/prepare-build-dir.sh
+ cat $BUILDFILE | sed "s|@type@|$type|" > $CURBUILDFILE
+done
+
+# make the directories eclipse is expecting
+# make the directories eclipse is expecting
+echo " making the 'features' and 'plugins' directories"
+mkdir -p $BUILDDIR/features $BUILDDIR/plugins
+
@ -51,21 +51,25 @@ diff -N templates/package-build/prepare-build-dir.sh
+FEATURES=$(find $SOURCEDIR -name feature.xml)
+find $SOURCEDIR -name feature.xml | while read f; do
+ PROJECTDIR=$(dirname "$f")
+ PROJECTNAME=$(ant -Dbasedir="$PROJECTDIR" -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ ERROR=""
+ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the feature id for $PROJECTDIR"
+ if [ $TESTING != true ]; then
+ exit 1
+ else
+ ERROR="yes"
+ inSDK=1
+ inSDK=$(echo $PROJECTDIR | grep -c $BUILDDIR)
+ if [ $inSDK == 0 ]; then
+ PROJECTNAME=$(ant -Dbasedir="$PROJECTDIR" -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ ERROR=""
+ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the feature id for $PROJECTDIR"
+ if [ $TESTING != true ]; then
+ exit 1
+ else
+ ERROR="yes"
+ fi
+ fi
+ fi
+
+ if [ "x$ERROR" != "xyes" ]; then
+ if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
+ echo " making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
+ ln -sf "$PROJECTDIR" $BUILDDIR/features/"$PROJECTNAME"
+ fi
+ fi
+ fi
+done
@ -75,21 +79,26 @@ diff -N templates/package-build/prepare-build-dir.sh
+find $SOURCEDIR -name plugin.xml -o -name fragment.xml -o -name MANIFEST.MF | sed "s/plugin.xml//g" | sed "s/fragment.xml//g" | sed "s/META-INF\/MANIFEST.MF//" | sort | uniq | while read dir; do
+ PROJECTNAME=""
+ ERROR=""
+ if [ -e "$dir/META-INF/MANIFEST.MF" ]; then
+ PROJECTNAME=$(grep Bundle-SymbolicName $dir/META-INF/MANIFEST.MF | cut --delimiter=';' -f 1 | cut --delimiter=' ' -f 2)
+ elif [ -e "$dir/plugin.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/plugin-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ elif [ -e "$dir/fragment.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/fragment-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ fi
+
+ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the plugin or fragment id for $dir"
+ if [ $TESTING != true ]; then
+ exit 1
+ else
+ ERROR="yes"
+ inSDK=1
+ inSDK=$(echo $dir | grep -c $BUILDDIR)
+ if [ $inSDK == 0 ]; then
+ if [ -e "$dir/META-INF/MANIFEST.MF" ]; then
+ PROJECTNAME=$(grep Bundle-SymbolicName $dir/META-INF/MANIFEST.MF | cut --delimiter=';' -f 1 | cut --delimiter=' ' -f 2)
+ elif [ -e "$dir/plugin.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/plugin-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ elif [ -e "$dir/fragment.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/fragment-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ fi
+
+ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the plugin or fragment id for $dir"
+ if [ $TESTING != true ]; then
+ exit 1
+ else
+ ERROR="yes"
+ fi
+ fi
+
+ fi
+
+ if [ "x$ERROR" != "xyes" ]; then
@ -99,10 +108,10 @@ diff -N templates/package-build/prepare-build-dir.sh
+ fi
+ fi;
+
+done
+done
+
+rm -rf $BUILDDIR/tmp
+echo done
+echo done
Index: templates/package-build/customTargets-assemble-target.xml
===================================================================
RCS file: templates/package-build/customTargets-assemble-target.xml

View File

@ -18,6 +18,7 @@ Optional arguments:
-v Be verbose
-D Debug platform itself (passes -consolelog -debug to Eclipse)
-o Directory containing Orbit-style dependencies
-z Comma-delimited list of dependency zips (not for use during RPM build)
_EOF_
}
@ -115,9 +116,10 @@ debugPlatform=0
orbitDepsDir=
p2Generate=
testing=false
zipDeps=
# See above. r = dry run (used for testing)
while getopts “hf:d:a:j:tvrDo:” OPTION
while getopts “hf:d:z:a:j:tvrDo:” OPTION
do
case $OPTION in
h)
@ -151,6 +153,9 @@ do
o)
orbitDepsDir=$OPTARG
;;
z)
zipDeps=$OPTARG
;;
?)
usage
exit
@ -208,6 +213,30 @@ if [ "x$orbitDepsDir" != "x" ]; then
orbitDeps="-DorbitDepsDir=\"$orbitDepsDir\""
fi
if [ "x$zipDeps" != "x" ]; then
OLD_IFS="$IFS"
IFS=","
zipDepsArray=($zipDeps)
IFS="$OLD_IFS"
numZips=${#zipDepsArray[@]}
for (( i=0; i< $numZips; i++ )); do
thisZip=${zipDepsArray[$i]}
thisFile=$(basename $thisZip)
thisURL=$(echo $thisZip | sed s/$thisFile//)
if [ ! -e $thisFile ]; then
wget -q $thisZip
fi
mkdir -p tmp
unzip -q -o $thisFile -d tmp
cp -raf tmp/eclipse/features/* $SDK/features
cp -raf tmp/eclipse/plugins/* $SDK/plugins
rm -rf tmp
thisZip=
thisFile=
thisURL=
done
fi
echo "Starting build:"
if [ $testing != true ]; then

View File

@ -30,7 +30,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
Release: 10%{?dist}
Release: 11%{?dist}
License: EPL
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@ -1537,6 +1537,9 @@ fi
#%{_libdir}/%{name}/configuration/org.eclipse.equinox.source
%changelog
* Mon Dec 15 2008 Andrew Overholt <overholt@redhat.com> 1:3.4.1-12
- Update pdebuild and package-build patch to include -z option.
* Fri Dec 5 2008 Andrew Overholt <overholt@redhat.com> 1:3.4.1-10
- Remove MaxPermSize from sysproperty lists in library.xml as it was causing the
JVM to not start.