Kill PDE build support for RPMs.

PDE building RPM-packaged plug-ins has long proved to be fragile
to maintain, so a concerted effort has been made to move all RPM
packaged plug-ins in Fedora to Tycho. All future RPM packages must
use Tycho to build in Fedora.

Change-Id: I2f47daff75d8c51d92b2991c93b733eab9b8af8b
Signed-off-by: Mat Booth <mat.booth@redhat.com>
Reviewed-on: https://git.eclipse.org/r/71435
diff --git a/pdebuildscripts/eclipse-copy-platform.sh b/pdebuildscripts/eclipse-copy-platform.sh
deleted file mode 100755
index 8d2ec39..0000000
--- a/pdebuildscripts/eclipse-copy-platform.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#! /bin/sh
-
-# We need to make our own copy of the eclipse platform in order to
-# build against it.  We do this since the build root might already
-# contain a copy of the plugin we are building -- and the eclipse
-# releng scripts fail in this situation.  We put this script in the
-# eclipse core so that it is easy to use from other spec files.
-
-# Arguments are:
-# * directory where results should end up (script will make it)
-# * base location of eclipse platform install
-# * an optional string that is used to select non-platform
-#   plugins and features.  At present if a plugin or feature has
-#   this as a substring, it will be included.  You need only run
-#   this script once, it will link both the platform and the other
-#   optionally-selected parts in a single invocation.
-
-# Test to see if the minimum arguments
-# are specified
-
-function symlinkInternal () {
-(cd $eclipse/$1; ls -d "$optional" 2>/dev/null) |
-      while read f; do
-	  if [ -e $eclipse/$1/$f/eclipse ]; then
-	      (cd $eclipse/$1/$f/eclipse;
-				ls -d plugins/* features/* 2>/dev/null) |
-	      while read g; do
-		  [ ! -e $g ] && \
-		    ln -s $eclipse/$1/$f/eclipse/$g $g
-	      done
-          else
-	      (cd $eclipse/$1/$f;
-				ls -d plugins/* features/* 2>/dev/null) |
-	      while read g; do
-	          [ ! -e $g ] && \
-		    ln -s $eclipse/$1/$f/$g $g
-	      done
-          fi
-      done
-      (cd $datadir/$1; ls -d "$optional" 2>/dev/null) |
-      while read f; do
-	  if [ -e $datadir/$1/$f/eclipse ]; then
-	      (cd $datadir/$1/$f/eclipse;
-				ls -d plugins/* features/* 2>/dev/null) |
-	      while read g; do
-		  [ ! -e $g ] && \
-		    ln -s $datadir/$1/$f/eclipse/$g $g
-	      done
-          else
-	      (cd $datadir/$1/$f;
-				ls -d plugins/* features/* 2>/dev/null) |
-	      while read g; do
-	          [ ! -e $g ] && \
-		    ln -s $datadir/$1/$g $g
-	      done
-          fi
-      done
-}
-
-if [ $# -lt 2 ]; then
-  echo "Usage: copy-platform where eclipse_base optional_directories"
-  echo "For example: copy-plaform ~/SDK /usr/lib/eclipse cdt pydev jdt"
-  exit 1
-fi
-
-where=$1; shift
-eclipse=$1; shift
-
-datadir=@DATADIR@/eclipse
-
-mkdir -p $where/plugins $where/features
-cd $where
-
-# Are there any optional arguments left?
-if [ $# -gt 0 ]; then
-   for optional in "$@"; do
-      (cd $eclipse;
-	ls -d plugins/*"$optional"* features/*"$optional"* 2>/dev/null) |
-      while read f; do
-         [ ! -e $f ] && ln -s $eclipse/$f $f
-      done
-   symlinkInternal dropins
-   symlinkInternal droplets
-   done
-fi
-for p in $(ls -d $eclipse/dropins/jdt/plugins/*); do
-    plugin=$(basename $p)
-    [ ! -e plugins/$plugin ] && ln -s $eclipse/dropins/jdt/plugins/$plugin plugins/$plugin
-done
-for f in $(ls -d $eclipse/dropins/jdt/features/*); do
-    feature=$(basename $f)
-    [ ! -e features/$feature ] && ln -s $eclipse/dropins/jdt/features/$feature features/$feature
-done
-for p in $(ls -d $eclipse/dropins/sdk/plugins/*); do
-    plugin=$(basename $p)
-    [ ! -e plugins/$plugin ] && ln -s $eclipse/dropins/sdk/plugins/$plugin plugins/$plugin
-done
-for f in $(ls -d $eclipse/dropins/sdk/features/*); do
-    feature=$(basename $f)
-    [ ! -e features/$feature ] && ln -s $eclipse/dropins/sdk/features/$feature features/$feature
-done
-for p in $(ls -d $eclipse/plugins/*); do
-    plugin=$(basename $p)
-    [ ! -e plugins/$plugin ] && ln -s $eclipse/plugins/$plugin plugins/$plugin
-done
-for f in $(ls -d $eclipse/features/*); do
-    feature=$(basename $f)
-    [ ! -e features/$feature ] && ln -s $eclipse/features/$feature features/$feature
-done
diff --git a/pdebuildscripts/eclipse-pdebuild.sh b/pdebuildscripts/eclipse-pdebuild.sh
deleted file mode 100755
index b9280ea..0000000
--- a/pdebuildscripts/eclipse-pdebuild.sh
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/bin/bash
-
-# args:  [-f <feature>] [-d <dependencies (outside SDK)>] [-a <additional build args>] [-j <JVM args>] [-v] [-D] [-o <Orbit dependencies>]
-
-function usage {
-cat << _EOF_
-usage: $0 [<options>]
-
-Use PDE Build to build Eclipse features
-
-Optional arguments:
-   -h      Show this help message
-   -f      Feature ID to build
-   -d      Plugin dependencies in addition to Eclipse SDK
-           (space-separated, names on which to glob features and plugins)
-   -a      Additional build arguments (ex. -DjavacSource=1.5)
-   -j      VM arguments (ex. -DJ2SE-1.5=%{_jvmdir}/java/jre/lib/rt.jar)
-   -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_
-}
-
-function copyPlatform {
-    # This seems silly but I was running into issues with empty strings
-    # counting as arguments to copy-platform -- overholt, 2008-03
-    if [ -z "$dependencies" ]; then
-        if [ $verbose -eq 1 ]; then
-            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
-            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
-        else
-            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
-            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
-        fi
-    else
-        if [ $verbose -eq 1 ]; then
-            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
-            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
-        else
-            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
-            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
-        fi
-    fi
-}
-
-function findFeatureId {
-    # We can determine the feature ID if we have only one
-    numFeatures=$(find $sourceDir -name feature.xml | wc -l)
-    if [ $numFeatures -ne 1 ]; then
-        #echo "# features found = $numFeatures"
-        echo "Cannot determine feature ID.  Please specify with -f."
-        usage
-        exit 1
-    fi
-    
-    featureXml=$(find $sourceDir -name feature.xml)
-    
-    # Taken from Ben Konrath's package-build
-    # make an ant build files to extract the id from the feature.xml
-    buildFile=$buildDir/findFeatureForRPM-tmp-build.xml
-    
-    echo "<project default=\"main\">
-    	<target name=\"main\">
-                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
-    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
-                   	<echo message=\"\${feature.id}\" />
-            </target>
-    </project>" > $buildFile
-    
-    featureId=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | cut --delimiter=' ' -f 7)
-    rm $buildFile
-}
-
-function findFeatureNameAndVersion {
-    featureXml=$(find $sourceDir -name feature.xml | while read f; do grep -l id=\"$featureId\" $f; done)
-    
-    buildFile=$buildDir/findFeatureForRPM-tmp-build.xml
-    
-    echo "<project default=\"main\">
-    	<target name=\"main\">
-                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
-    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
-                   	<echo message=\"\${feature.label}\" />
-            </target>
-    </project>" > $buildFile
-    
-    featureName=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | sed "s/.*\[echo\]\ //")
-    rm $buildFile
-
-    echo "<project default=\"main\">
-    	<target name=\"main\">
-                   	<xmlproperty file=\"$featureXml\" collapseAttributes=\"true\"/>
-    		<fail unless=\"feature.id\" message=\"feature.id not set\"/>
-                   	<echo message=\"\${feature.version}\" />
-            </target>
-    </project>" > $buildFile
-    
-    featureVersion=$(ant -Dbasedir=$sourceDir -f $buildFile 2>&1 | grep echo | sed "s/.*\[echo\]\ //")
-    rm $buildFile
-}
-
-function findMaxBREE {
-	manifests=$(find $sourceDir -name MANIFEST.MF)
-	maxBree=1.4
-	for i in $manifests; do
-		breeLine=$(cat $i|grep RequiredExecutionEnvironment|cut -c37-|sed 's/^ *\(.*\) *$/\1/')
-		case $breeLine in
-         "J2SE-1.5")
-         	 bree=1.5
-             ;;
-         "JavaSE-1.6")
-         	 bree=1.6
-             ;;
-         "JavaSE-1.7")
-         	 bree=1.7
-             ;;
-         "JavaSE-1.8")
-         	 bree=1.8
-             ;;
-     	esac
-     	if [ "$bree" \> "$maxBree" ]; then
-     		maxBree=$bree
-     	fi
-    done
-}
-
-sourceDir=$PWD
-buildDir=$PWD/build
-SDK=$buildDir/SDK
-homeDir=$buildDir/home
-workspaceDir=$homeDir/workspace
-datadir=@LIBDIR@
-pdeBuildDir=$(cd $datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_* && pwd)
-
-featureId=
-dependencies=
-additionalArgs=
-vmArgs=
-verbose=0
-dryRun=0
-debugPlatform=0
-orbitDepsDir=
-p2Generate=
-testing=false
-zipDeps=
-
-# See above.  r = dry run (used for testing)
-while getopts “hf:d:z:a:j:tvrDo:” OPTION
-do
-     case $OPTION in
-         h)
-             usage
-             exit
-             ;;
-         f)
-             featureId=$OPTARG
-             ;;
-         d)
-             dependencies=$OPTARG
-             ;;
-         a)
-             additionalArgs=$OPTARG
-             ;;
-         j)
-             vmArgs=$OPTARG
-             ;;
-         t)
-             testing=true
-             ;;
-         v)
-             verbose=1
-             ;;
-         r)
-             dryRun=1
-             ;;
-         D)
-             debugPlatform=1
-             ;;
-         o)
-             orbitDepsDir=$OPTARG
-             ;;
-         z)
-             zipDeps=$OPTARG
-             ;;
-         ?)
-             usage
-             exit 1
-             ;;
-     esac
-done
-
-echo "mkdir -p $buildDir"
-if [ $dryRun -ne 1 ]; then
-    mkdir -p $buildDir
-fi
-
-# Eclipse may try to write to the building user's home directory so we create a
-# temporary one for use by the build.
-echo "mkdir -p $homeDir"
-if [ $dryRun -ne 1 ]; then
-    mkdir -p $homeDir
-fi
-
-echo "mkdir -p $workspaceDir"
-if [ $dryRun -ne 1 ]; then
-    mkdir -p $workspaceDir
-fi
-
-if [ -z $featureId ]; then
-    findFeatureId
-fi
-
-if [ -z $featureId ]; then
-    echo "Cannot determine feature ID.  Please specify with -f."
-    usage
-    exit 1
-fi
-
-findFeatureNameAndVersion
-
-echo "Building feature = $featureId."
-
-if [ -z "$dependencies" ]; then
-    if [ $verbose -eq 1 ]; then
-        echo "Assuming no dependencies except Eclipse SDK."
-    fi
-fi
-
-# Symlink the SDK and dependencies for build
-if [ -z "$dependencies" ]; then
-    echo "Symlinking SDK into $SDK directory."
-else
-    echo "Symlinking SDK and \"$dependencies\" into $SDK directory."
-fi
-if [ $dryRun -ne 1 ]; then
-    copyPlatform
-fi
-
-if [ $debugPlatform -eq 1 ]; then
-    debugPlatformArgs="-debug -consolelog"
-fi
-
-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
-if [ -z "$additionalArgs" ]; then
-	findMaxBREE
-	additionalArgs="-DjavacSource=$maxBree -DjavacTarget=$maxBree"
-fi
-
-echo "Starting build:"
-
-launcherJar=$(ls $SDK/plugins | grep "org.eclipse.equinox.launcher_")
-
-if [ $testing != true ]; then
-  java -cp $SDK/plugins/${launcherJar} \
-    -Duser.home=$homeDir \
-    $vmArgs \
-    org.eclipse.core.launcher.Main \
-    -data $workspaceDir \
-    -application org.eclipse.ant.core.antRunner \
-    $debugPlatformArgs \
-    -Dtype=feature \
-    -Did=$featureId \
-    -DbaseLocation=$SDK \
-    -DsourceDirectory=$sourceDir \
-    -DbuildDirectory=$buildDir \
-    -Dbuilder=$pdeBuildDir/templates/package-build \
-    $orbitDeps \
-    -Dtesting="$testing" \
-    $additionalArgs \
-    -f $pdeBuildDir/scripts/build.xml
-else
-  echo "\
-  java -cp $SDK/plugins/${launcherJar} \
-    -Duser.home=$homeDir \
-    $vmArgs \
-    org.eclipse.core.launcher.Main \
-    -data $workspaceDir \
-    -application org.eclipse.ant.core.antRunner \
-    $debugPlatformArgs \
-    -Dtype=feature \
-    -Did=$featureId \
-    -DbaseLocation=$SDK \
-    -DsourceDirectory=$sourceDir \
-    -DbuildDirectory=$buildDir \
-    -Dbuilder=$pdeBuildDir/templates/package-build \
-    $orbitDeps \
-    -Dtesting=\"$testing\" \
-    $additionalArgs \
-    -f $pdeBuildDir/scripts/build.xml
-  "
-fi
-
-exit $?