[retro] build from git

This commit is contained in:
Gwenhael Le Moine 2021-11-30 12:29:57 +01:00
parent 542a49c71e
commit b1fba01e4c
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -10,22 +10,26 @@ CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
VERSION=${VERSION:-trunk}
ARCH=${ARCH:-$(uname -m)}
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=${PREFIX:-/usr}
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
rm -fr $PKG $TMP/$PRGNAM
mkdir -p $PKG
# mise en place
cd $TMP
[ ! -e $CWD/${PRGNAM}_latest.tar.gz ] && wget -c http://forthworks.com/retro/r/latest.tar.gz -O $CWD/${PRGNAM}_latest.tar.gz
tar xf $CWD/${PRGNAM}_latest.tar.gz
VERSION=$(find -name RETRO\* -type d | sed 's|./RETRO||')
cd $TMP/RETRO${VERSION}
[ ! -e $REPOSITORY ] && git clone https://git.sr.ht/~crc_/retroforth $REPOSITORY
cp -R $REPOSITORY $TMP/$PRGNAM
cd $TMP/$PRGNAM
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
make PREFIX=$PREFIX
make install PREFIX=$PREFIX DESTDIR=$PKG MANDIR=$PREFIX/man/man1 DOCSDIR=$PREFIX/doc/$PRGNAM/ EXAMPLESDIR=$PREFIX/doc/$PRGNAM/examples/