Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 821a8e69b958eb86c2b976136f96363e > files > 1

t-engine4-1.7.2-2.mga9.src.rpm

#!/bin/bash

VERSION=1.7.2
URL=https://te4.org/dl/t-engine
SRCDIR=t-engine4-src-$VERSION
SRCFILE=$SRCDIR.tar.bz2
TOMEDIR=tome-$VERSION

if [ ! -e ./$SRCFILE ]; then
  echo "*** Source file missing in current dir, downloading.."
  wget -c $URL/$SRCFILE
fi

tar xvf $SRCFILE

echo "*** Extracting ToME (partly nonfree) files for tome SRPM.."
mkdir -p $TOMEDIR/game/{addons,modules}
mv $SRCDIR/game/addons/tome-* $TOMEDIR/game/addons/
mv $SRCDIR/game/modules/tome-* $TOMEDIR/game/modules/
cp $SRCDIR/{CREDITS,COPYING-MEDIA} $TOMEDIR/

echo "*** Creating ToME tarball.."
tar cvJf $TOMEDIR{.tar.xz,}

echo "*** Creating T-Engine 4 tarball.."
mv $SRCDIR t-engine4-$VERSION
tar cvJf t-engine4-$VERSION{.tar.xz,}