a1e75b7
#!/bin/bash -x
a1e75b7
#  this file contains defaults for currently generated source tarballs
a1e75b7
a1e75b7
set -e
a1e75b7
a1e75b7
# TAPSET
a1e75b7
export PROJECT_NAME="hg"
a1e75b7
export REPO_NAME="icedtea8"
a1e75b7
export VERSION="9d464368e06d"
a1e75b7
export COMPRESSION=xz
a1e75b7
export OPENJDK_URL=http://icedtea.classpath.org
a1e75b7
export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
a1e75b7
export TO_COMPRESS="*/tapset"
a1e75b7
# warning, filename  and filenameroot creation is duplicated here from generate_source_tarball.sh
a1e75b7
CLONED_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
a1e75b7
TAPSET_VERSION=3.2
a1e75b7
TAPSET=systemtap_"$TAPSET_VERSION"_tapsets_$CLONED_FILENAME
a1e75b7
if [ ! -f ${TAPSET} ] ; then
a1e75b7
  if [ ! -f ${CLONED_FILENAME} ] ; then
a1e75b7
  echo "Generating ${CLONED_FILENAME}"
a1e75b7
    sh ./generate_source_tarball.sh
a1e75b7
  else 
a1e75b7
    echo "exists exists exists exists exists exists exists "
a1e75b7
    echo "reusing reusing reusing reusing reusing reusing "
a1e75b7
    echo ${CLONED_FILENAME}
a1e75b7
  fi
a1e75b7
  mv -v $CLONED_FILENAME  $TAPSET
a1e75b7
else 
a1e75b7
  echo "exists exists exists exists exists exists exists "
a1e75b7
  echo "reusing reusing reusing reusing reusing reusing "
a1e75b7
  echo ${TAPSET}
a1e75b7
fi
a1e75b7
a1e75b7
# OpenJDK from Shenandoah project
a1e75b7
export PROJECT_NAME="jdk"
a1e75b7
export REPO_NAME="jdk12"
a1e75b7
# warning, clonning without shenadnaoh suffix, you will clone pure jdk - thus without shenandaoh GC
a1e75b7
export VERSION="jdk-12+25"
a1e75b7
export COMPRESSION=xz
a1e75b7
# unset tapsets overrides
a1e75b7
export OPENJDK_URL=""
a1e75b7
export TO_COMPRESS=""
a1e75b7
# warning, filename  and filenameroot creation is duplicated here from generate_source_tarball.sh
a1e75b7
export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
a1e75b7
FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
a1e75b7
a1e75b7
if [ ! -f ${FILENAME} ] ; then
a1e75b7
echo "Generating ${FILENAME}"
a1e75b7
  sh ./generate_source_tarball.sh
a1e75b7
else 
a1e75b7
  echo "exists exists exists exists exists exists exists "
a1e75b7
  echo "reusing reusing reusing reusing reusing reusing "
a1e75b7
  echo ${FILENAME}
a1e75b7
fi
a1e75b7
a1e75b7
set +e
a1e75b7
a1e75b7
major=`echo $REPO_NAME | sed 's/[a-zA-Z]*//g'`
a1e75b7
build=`echo $VERSION | sed 's/.*+//g'`
a1e75b7
name_helper=`echo $FILENAME | sed s/$major/'%{majorver}'/g `
a1e75b7
name_helper=`echo $name_helper | sed s/$build/'%{buildver}'/g `
a1e75b7
echo "align specfile acordingly:" 
a1e75b7
echo " sed 's/^Source0:.*/Source0: $name_helper/' -i *.spec"
a1e75b7
echo " sed 's/^Source8:.*/Source8: $TAPSET/'   -i *.spec"
a1e75b7
echo " sed 's/^%global buildver.*/%global buildver        $build/'   -i *.spec"
a1e75b7
echo " sed 's/Release:.*/Release: 1%{?dist}/'   -i *.spec"
a1e75b7
echo "and maybe others...."
a1e75b7
echo "you should fedpkg/rhpkg new-sources $TAPSET $FILENAME"
a1e75b7
echo "you should fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl"
a1e75b7