From b1fba01e4cb73094e1154b646c1597ae8767cd39 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 30 Nov 2021 12:29:57 +0100 Subject: [PATCH] [retro] build from git --- d/retro/SlackBuild | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/d/retro/SlackBuild b/d/retro/SlackBuild index e77130bf..8a7a3f7e 100755 --- a/d/retro/SlackBuild +++ b/d/retro/SlackBuild @@ -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/