From 8feecaab4bad12643a675d0e6b0fbd535689535c Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 29 Sep 2021 12:57:50 +0200 Subject: [PATCH] download files in $REPOSITORY instead of $CWD --- ap/hledger-bin/SlackBuild | 14 +++++++++----- ap/oil/SlackBuild | 8 ++++++-- ap/pandoc-bin/SlackBuild | 8 ++++++-- d/crystal/SlackBuild | 12 ++++++++---- d/factor/SlackBuild | 8 ++++++-- d/ghcup/SlackBuild | 8 ++++++-- d/zig/SlackBuild | 8 ++++++-- lua/lgi/SlackBuild | 13 +++++-------- lua/lua/SlackBuild | 12 ++++++++---- xap/LDCad/SlackBuild | 14 +++++++++----- xap/android-x86/SlackBuild | 10 +++++++--- xap/calibre/SlackBuild | 12 ++++++++---- xap/dbeaver/SlackBuild | 9 ++++++--- xap/leocad/SlackBuild | 4 ++-- xap/makemkv/SlackBuild | 12 ++++++++---- y/Blockout/SlackBuild | 9 ++++++--- y/REminiscence_FlashBack/SlackBuild | 17 ++++++++++------- y/lutris/SlackBuild | 8 ++++++-- y/minecraft-launcher/SlackBuild | 14 +++++++++----- y/steam/SlackBuild | 14 +++++++++----- 20 files changed, 140 insertions(+), 74 deletions(-) diff --git a/ap/hledger-bin/SlackBuild b/ap/hledger-bin/SlackBuild index 193e1a6c..395a0aae 100755 --- a/ap/hledger-bin/SlackBuild +++ b/ap/hledger-bin/SlackBuild @@ -13,18 +13,22 @@ PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + echo $ARCH | grep -q 64 && SRC_ARCH=x64 DOCS="CHANGES.md CONTRIBUTING.md CREDITS.md LICENSE README.md ROADMAP.md" -wget -c https://github.com/simonmichael/hledger/releases/download/${VERSION}/hledger-linux-static-${SRC_ARCH}.zip -O $CWD/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip +wget -c https://github.com/simonmichael/hledger/releases/download/${VERSION}/hledger-linux-static-${SRC_ARCH}.zip -O $REPOSITORY/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip for d in $DOCS; do - wget -c https://raw.githubusercontent.com/simonmichael/hledger/${VERSION}/${d} -O $CWD/${d}.${VERSION} + wget -c https://raw.githubusercontent.com/simonmichael/hledger/${VERSION}/${d} -O $REPOSITORY/${d}.${VERSION} done rm -fr $PKG mkdir -p $PKG$PREFIX/bin cd $PKG$PREFIX/bin -unzip $CWD/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip -rm $CWD/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip +unzip $REPOSITORY/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip +rm $REPOSITORY/hledger-linux-static-${SRC_ARCH}-${VERSION}.zip mv hledger-linux-static-${SRC_ARCH} hledger mv hledger-ui-linux-static-${SRC_ARCH} hledger-ui mv hledger-web-linux-static-${SRC_ARCH} hledger-web @@ -32,7 +36,7 @@ chmod +x $PKG$PREFIX/bin/* mkdir -p $PKG$PREFIX/doc/hledger/ for d in $DOCS; do - mv $CWD/${d}.${VERSION} $PKG$PREFIX/doc/hledger/${d} + mv $REPOSITORY/${d}.${VERSION} $PKG$PREFIX/doc/hledger/${d} done mkdir -p $PKG/etc/rc.d/ diff --git a/ap/oil/SlackBuild b/ap/oil/SlackBuild index 20f2ac5c..95eccfc3 100755 --- a/ap/oil/SlackBuild +++ b/ap/oil/SlackBuild @@ -14,6 +14,10 @@ PKG=$TMP/pkg-$PRGNAM PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + mkdir -p $TMP cd $TMP @@ -21,9 +25,9 @@ cd $TMP rm -fr $PRGNAM-${VERSION} $PKG # Fetching binaries -[ ! -e $CWD/${PRGNAM}-${VERSION}.tar.xz ] && wget -c https://www.oilshell.org/download/${PRGNAM}-${VERSION}.tar.xz -O $CWD/${PRGNAM}-${VERSION}.tar.xz +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.tar.xz ] && wget -c https://www.oilshell.org/download/${PRGNAM}-${VERSION}.tar.xz -O $REPOSITORY/${PRGNAM}-${VERSION}.tar.xz -tar xvf $CWD/${PRGNAM}-${VERSION}.tar.xz +tar xvf $REPOSITORY/${PRGNAM}-${VERSION}.tar.xz cd ${PRGNAM}-${VERSION} # configuration diff --git a/ap/pandoc-bin/SlackBuild b/ap/pandoc-bin/SlackBuild index e846e64d..5873614f 100755 --- a/ap/pandoc-bin/SlackBuild +++ b/ap/pandoc-bin/SlackBuild @@ -11,13 +11,17 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -[ ! -e $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz https://github.com/jgm/pandoc/releases/download/$VERSION/pandoc-$VERSION-linux-amd64.tar.gz +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz https://github.com/jgm/pandoc/releases/download/$VERSION/pandoc-$VERSION-linux-amd64.tar.gz rm -fr $PKG mkdir -p $PKG cd $PKG -tar xvf $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz +tar xvf $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz mv pandoc-${VERSION} usr mv usr/share/man usr/ diff --git a/d/crystal/SlackBuild b/d/crystal/SlackBuild index c1326c0d..50cebd8a 100755 --- a/d/crystal/SlackBuild +++ b/d/crystal/SlackBuild @@ -17,18 +17,22 @@ LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/crystal-lang/crystal/r VERSION=$(echo $LATEST_RELEASE_URL | grep -o "/crystal-[0-9.-]*-" | sed "s|/crystal-\([0-9.-]*\)-|\1|g") CLEAN_VERSION=$(echo $VERSION | tr '-' '_') +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + # cleaning rm -fr $PKG # download -[ ! -e $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz ] && wget -c https://github.com/manastech/crystal/releases/download/$(echo $VERSION | grep -o "[0-9.]*" | head -n1)/crystal-${VERSION}-linux-${ARCH}.tar.gz -O $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz +[ ! -e $REPOSITORY/crystal-${VERSION}-linux-${ARCH}.tar.gz ] && wget -c https://github.com/manastech/crystal/releases/download/$(echo $VERSION | grep -o "[0-9.]*" | head -n1)/crystal-${VERSION}-linux-${ARCH}.tar.gz -O $REPOSITORY/crystal-${VERSION}-linux-${ARCH}.tar.gz -[ ! -e $CWD/completion.zsh ] && wget -c https://raw.githubusercontent.com/crystal-lang/crystal/master/etc/completion.zsh -O $CWD/completion.zsh +[ ! -e $REPOSITORY/completion.zsh ] && wget -c https://raw.githubusercontent.com/crystal-lang/crystal/master/etc/completion.zsh -O $REPOSITORY/completion.zsh # installation mkdir -p $PKG cd $PKG -tar xvf $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz +tar xvf $REPOSITORY/crystal-${VERSION}-linux-${ARCH}.tar.gz mv crystal-$VERSION $PKG$PREFIX mkdir -p $PKG$PREFIX/doc/ mv $PKG$PREFIX/share/doc $PKG$PREFIX/doc/$PRGNAM @@ -36,7 +40,7 @@ mv $PKG$PREFIX/share/licenses $PKG$PREFIX/doc/$PRGNAM mv $PKG$PREFIX/share/man $PKG$PREFIX/ mkdir -p $PKG$PREFIX/share/zsh/site-functions/ -cp -R $CWD/completion.zsh $PKG$PREFIX/share/zsh/site-functions/_crystal +cp -R $REPOSITORY/completion.zsh $PKG$PREFIX/share/zsh/site-functions/_crystal # sed -i "s|INSTALL_DIR=.*|INSTALL_DIR=$PREFIX/libexec/$PRGNAM|g" $PKG$PREFIX/bin/crystal diff --git a/d/factor/SlackBuild b/d/factor/SlackBuild index 72ca576e..91611112 100755 --- a/d/factor/SlackBuild +++ b/d/factor/SlackBuild @@ -14,15 +14,19 @@ TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + # cleaning rm -fr $PKG # unpacking -[ ! -e $CWD/${PRGNAM}-${VERSION}.tar.gz ] && wget -c http://downloads.factorcode.org/releases/$VERSION/factor-linux-x86-64-$VERSION.tar.gz -O $CWD/${PRGNAM}-${VERSION}.tar.gz +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz ] && wget -c http://downloads.factorcode.org/releases/$VERSION/factor-linux-x86-64-$VERSION.tar.gz -O $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz mkdir -p $PKG$PREFIX/libexec/ ( cd $PKG$PREFIX/libexec/ - tar xf $CWD/${PRGNAM}-${VERSION}.tar.gz + tar xf $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz ) # installation diff --git a/d/ghcup/SlackBuild b/d/ghcup/SlackBuild index c63c6572..35e77ca0 100755 --- a/d/ghcup/SlackBuild +++ b/d/ghcup/SlackBuild @@ -13,12 +13,16 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -[ ! -e $CWD/${PRGNAM}-${VERSION} ] && wget -c -O $CWD/${PRGNAM}-${VERSION} https://downloads.haskell.org/~ghcup/$VERSION/${ARCH}-linux-ghcup-$VERSION +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION} ] && wget -c -O $REPOSITORY/${PRGNAM}-${VERSION} https://downloads.haskell.org/~ghcup/$VERSION/${ARCH}-linux-ghcup-$VERSION rm -fr $PKG mkdir -p $PKG/bin -cp $CWD/${PRGNAM}-${VERSION} $PKG/bin/$PRGNAM +cp $REPOSITORY/${PRGNAM}-${VERSION} $PKG/bin/$PRGNAM mkdir -p $PKG/install diff --git a/d/zig/SlackBuild b/d/zig/SlackBuild index 54cf22d7..476b60c6 100755 --- a/d/zig/SlackBuild +++ b/d/zig/SlackBuild @@ -14,15 +14,19 @@ TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + # cleaning rm -fr $PKG # unpacking -[ ! -e $CWD/zig-linux-${ARCH}-${VERSION}.tar.gz ] && wget -c https://ziglang.org/download/${VERSION}/zig-linux-${ARCH}-${VERSION}.tar.xz -O $CWD/zig-linux-${ARCH}-${VERSION}.tar.gz +[ ! -e $REPOSITORY/zig-linux-${ARCH}-${VERSION}.tar.gz ] && wget -c https://ziglang.org/download/${VERSION}/zig-linux-${ARCH}-${VERSION}.tar.xz -O $REPOSITORY/zig-linux-${ARCH}-${VERSION}.tar.gz mkdir -p $TMP cd $TMP -tar xvf $CWD/zig-linux-${ARCH}-${VERSION}.tar.gz +tar xvf $REPOSITORY/zig-linux-${ARCH}-${VERSION}.tar.gz cd zig-linux-${ARCH}-${VERSION} # installation diff --git a/lua/lgi/SlackBuild b/lua/lgi/SlackBuild index 662ed117..f30ef442 100755 --- a/lua/lgi/SlackBuild +++ b/lua/lgi/SlackBuild @@ -23,16 +23,13 @@ rm -rf $PKG $TMP/$PRGNAM mkdir -p $PKG cd $TMP -if [ -e $CWD/$PRGNAM-$VERSION.tar.xz ] ; then - tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -else - [ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY - cd $REPOSITORY +[ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY +cd $REPOSITORY git pull --all - VERSION="git_$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" +VERSION="git_$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" + +cp -R $REPOSITORY $PRGNAM - cp -R $REPOSITORY $PRGNAM -fi cd $PRGNAM LUA_VERSION=$(lua -v 2>&1 | grep -o "5\..") diff --git a/lua/lua/SlackBuild b/lua/lua/SlackBuild index d7e98b39..c7fbe696 100755 --- a/lua/lua/SlackBuild +++ b/lua/lua/SlackBuild @@ -43,6 +43,10 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -67,9 +71,9 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf lua-$VERSION -[ ! -e $CWD/lua-$VERSION.tar.gz ] && wget -c https://www.lua.org/ftp/lua-$VERSION.tar.gz -O $CWD/lua-$VERSION.tar.gz +[ ! -e $REPOSITORY/lua-$VERSION.tar.gz ] && wget -c https://www.lua.org/ftp/lua-$VERSION.tar.gz -O $REPOSITORY/lua-$VERSION.tar.gz -tar xvf $CWD/lua-$VERSION.tar.gz +tar xvf $REPOSITORY/lua-$VERSION.tar.gz cd lua-$VERSION chown -R root:root . find -L . \ @@ -124,7 +128,7 @@ sed \ -e '/^INSTALL_LIB= /s,lib,&'"${LIBDIRSUFFIX}"',' \ -e '/^INSTALL_CMOD= /s,lib,&'"${LIBDIRSUFFIX}"',' \ -e '/^libdir=/s,/lib,&'"${LIBDIRSUFFIX}"',' \ - $CWD/lua.pc.in > lua.pc + $REPOSITORY/lua.pc.in > lua.pc ln -s lua.pc lua-$V.pc ln -s lua.pc lua${V%.?}${V#?.}.pc @@ -138,7 +142,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r mkdir -p $PKG/usr/doc/$PRGNAM cp -a README doc/* $PKG/usr/doc/$PRGNAM -cat $CWD/SlackBuild > $PKG/usr/doc/$PRGNAM/SlackBuild +cat $REPOSITORY/SlackBuild > $PKG/usr/doc/$PRGNAM/SlackBuild mkdir -p $PKG/install cat < $PKG/install/slack-desc diff --git a/xap/LDCad/SlackBuild b/xap/LDCad/SlackBuild index da37402c..60902e7d 100755 --- a/xap/LDCad/SlackBuild +++ b/xap/LDCad/SlackBuild @@ -11,16 +11,20 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -TARVERSION=$(echo $VERSION | tr . -) -[ ! -e $CWD/LDCad-$TARVERSION-Linux.tar.bz2 ] && wget -c -O $CWD/LDCad-$TARVERSION-Linux.tar.bz2 http://www.melkert.net/action/download/LDCad-$TARVERSION-Linux.tar.bz2 +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} -[ ! -e $CWD/complete.zip ] && wget -c -O $CWD/complete.zip http://www.ldraw.org/library/updates/complete.zip +mkdir -p $REPOSITORY + +TARVERSION=$(echo $VERSION | tr . -) +[ ! -e $REPOSITORY/LDCad-$TARVERSION-Linux.tar.bz2 ] && wget -c -O $REPOSITORY/LDCad-$TARVERSION-Linux.tar.bz2 http://www.melkert.net/action/download/LDCad-$TARVERSION-Linux.tar.bz2 + +[ ! -e $REPOSITORY/complete.zip ] && wget -c -O $REPOSITORY/complete.zip http://www.ldraw.org/library/updates/complete.zip rm -fr $PKG $TMP/LDCad-$TARVERSION-Linux mkdir -p $PKG $TMP cd $TMP -tar xvf $CWD/LDCad-$TARVERSION-Linux.tar.bz2 +tar xvf $REPOSITORY/LDCad-$TARVERSION-Linux.tar.bz2 cd LDCad-$TARVERSION-Linux mkdir -p $PKG/usr/bin @@ -43,7 +47,7 @@ mkdir -p $PKG/usr/share/LDCad mkdir -p $PKG/usr/share/LDCad/seeds cp -v seeds/*.sf $PKG/usr/share/LDCad/seeds cp -vr resources $PKG/usr/share/LDCad -cp $CWD/complete.zip $PKG/usr/share/LDCad +cp $REPOSITORY/complete.zip $PKG/usr/share/LDCad mkdir -p $PKG/usr/doc/LDCad cp -vr docs/* $PKG/usr/doc/LDCad diff --git a/xap/android-x86/SlackBuild b/xap/android-x86/SlackBuild index 852b5e34..fd96d2de 100755 --- a/xap/android-x86/SlackBuild +++ b/xap/android-x86/SlackBuild @@ -14,18 +14,22 @@ PKG=$TMP/pkg-$PRGNAM PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + mkdir -p $TMP # Cleaning rm -fr $PRGNAM $PKG # Fetching binaries -[ ! -e $CWD/${PRGNAM}-${VERSION}.${ARCH}.rpm ] && wget -c https://osdn.net/dl/android-x86/android-x86-${VERSION}.x86_64.rpm -O $CWD/${PRGNAM}-${VERSION}.${ARCH}.rpm +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.${ARCH}.rpm ] && wget -c https://osdn.net/dl/android-x86/android-x86-${VERSION}.x86_64.rpm -O $REPOSITORY/${PRGNAM}-${VERSION}.${ARCH}.rpm # Installation mkdir -p $PKG$PREFIX/share/ cd $PKG$PREFIX/share/ -rpm2targz $CWD/${PRGNAM}-${VERSION}.${ARCH}.rpm +rpm2targz $REPOSITORY/${PRGNAM}-${VERSION}.${ARCH}.rpm tar xvf ${PRGNAM}-${VERSION}.${ARCH}.tar.gz rm ${PRGNAM}-${VERSION}.${ARCH}.tar.gz @@ -33,7 +37,7 @@ rm -fr usr mv android-${VERSION} ${PRGNAM} mkdir -p $PKG$PREFIX/bin/ -cp $CWD/${PRGNAM}.sh $PKG$PREFIX/bin/ +cp $REPOSITORY/${PRGNAM}.sh $PKG$PREFIX/bin/ chmod 755 $PKG$PREFIX/bin/${PRGNAM}.sh mkdir -p $PKG$PREFIX/share/${PRGNAM} diff --git a/xap/calibre/SlackBuild b/xap/calibre/SlackBuild index dd06a2b7..d6ebbddd 100755 --- a/xap/calibre/SlackBuild +++ b/xap/calibre/SlackBuild @@ -11,21 +11,25 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -[ ! -e $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz http://download.calibre-ebook.com/${VERSION}/${PRGNAM}-${VERSION}-${ARCH}.txz +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz ] && wget -c -O $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz http://download.calibre-ebook.com/${VERSION}/${PRGNAM}-${VERSION}-${ARCH}.txz rm -fr $PKG mkdir -p $PKG/opt/${PRGNAM} -tar xvf $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz -C $PKG/opt/${PRGNAM} +tar xvf $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz -C $PKG/opt/${PRGNAM} -rm $CWD/${PRGNAM}-${VERSION}-${ARCH}.txz +rm $REPOSITORY/${PRGNAM}-${VERSION}-${ARCH}.txz mkdir -p $PKG/usr/bin $PKG/opt/calibre/calibre_postinstall --root=$PKG/usr mkdir -p $PKG/etc/rc.d/ -cp $CWD/rc.calibre-server $PKG/etc/rc.d/rc.calibre-server.new +cp $REPOSITORY/rc.calibre-server $PKG/etc/rc.d/rc.calibre-server.new cd $PKG/usr/bin find . -type l -exec sh -c 'rm "$1"; ln -s ../../opt/calibre/$(basename $1)' _ {} \; diff --git a/xap/dbeaver/SlackBuild b/xap/dbeaver/SlackBuild index 1a80a0d6..aed4c934 100755 --- a/xap/dbeaver/SlackBuild +++ b/xap/dbeaver/SlackBuild @@ -50,12 +50,16 @@ SRCNAM=${PRGNAM}-ce SRCVER=$VERSION-linux.gtk.$SRCARCH DESTDIR=$PKG/opt/ +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + # mise en place -[ ! -e $CWD/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz ] && wget -c -O $CWD/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz https://github.com/${PRGNAM}/${PRGNAM}/releases/download/${VERSION}/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz +[ ! -e $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz ] && wget -c -O $REPOSITORY/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz https://github.com/${PRGNAM}/${PRGNAM}/releases/download/${VERSION}/${SRCNAM}-${VERSION}-linux.gtk.${SRCARCH}.tar.gz mkdir -p $DESTDIR cd $DESTDIR -tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz +tar xvf $REPOSITORY/$SRCNAM-$SRCVER.tar.gz chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -79,7 +83,6 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ $DESTDIR/$PRGNAM/readme.txt $DESTDIR/$PRGNAM/licenses/* \ $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat < $PKG/install/slack-desc diff --git a/xap/leocad/SlackBuild b/xap/leocad/SlackBuild index cedd2e02..e94259d7 100755 --- a/xap/leocad/SlackBuild +++ b/xap/leocad/SlackBuild @@ -47,11 +47,11 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r LIBRARY_URL=$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases | grep -o "http.*Library-.*zip" | head -n1) LIBRARY_FILE=$(echo $LIBRARY_URL | grep -o "Library-[0-9.]*.zip") LIBRARY_VERSION=$(echo $LIBRARY_FILE | grep -o "[0-9.]*") -[ ! -e $CWD/$LIBRARY_FILE ] && wget -c -O $CWD/$LIBRARY_FILE $LIBRARY_URL +[ ! -e $REPOSITORY/$LIBRARY_FILE ] && wget -c -O $REPOSITORY/$LIBRARY_FILE $LIBRARY_URL # Data from zip-file + set permissions mkdir -p $PKG/usr/share/leocad -unzip $CWD/$LIBRARY_FILE -d $PKG/usr/share/leocad/ +unzip $REPOSITORY/$LIBRARY_FILE -d $PKG/usr/share/leocad/ chown -R root:root $PKG # correction diff --git a/xap/makemkv/SlackBuild b/xap/makemkv/SlackBuild index 10eaf117..6b6b538b 100755 --- a/xap/makemkv/SlackBuild +++ b/xap/makemkv/SlackBuild @@ -16,6 +16,10 @@ PKG=$TMP/pkg-$PRGNAM PREFIX=/usr +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + mkdir -p $TMP # Cleaning @@ -24,15 +28,15 @@ rm -fr $TMP/$PRGNAM $PKG # Fetching sources VERSION=${VERSION:-1.15.4} -[ ! -e $CWD/makemkv-bin-$VERSION.tar.gz ] && wget -c https://www.makemkv.com/download/makemkv-bin-$VERSION.tar.gz -O $CWD/makemkv-bin-$VERSION.tar.gz -[ ! -e $CWD/makemkv-oss-$VERSION.tar.gz ] && wget -c https://www.makemkv.com/download/makemkv-oss-$VERSION.tar.gz -O $CWD/makemkv-oss-$VERSION.tar.gz +[ ! -e $REPOSITORY/makemkv-bin-$VERSION.tar.gz ] && wget -c https://www.makemkv.com/download/makemkv-bin-$VERSION.tar.gz -O $REPOSITORY/makemkv-bin-$VERSION.tar.gz +[ ! -e $REPOSITORY/makemkv-oss-$VERSION.tar.gz ] && wget -c https://www.makemkv.com/download/makemkv-oss-$VERSION.tar.gz -O $REPOSITORY/makemkv-oss-$VERSION.tar.gz # Preparation mkdir -p $TMP/$PRGNAM cd $TMP/$PRGNAM -tar xvf $CWD/makemkv-bin-$VERSION.tar.gz -tar xvf $CWD/makemkv-oss-$VERSION.tar.gz +tar xvf $REPOSITORY/makemkv-bin-$VERSION.tar.gz +tar xvf $REPOSITORY/makemkv-oss-$VERSION.tar.gz chown -R root:root . find . \ diff --git a/y/Blockout/SlackBuild b/y/Blockout/SlackBuild index ed6ead22..53ee9213 100755 --- a/y/Blockout/SlackBuild +++ b/y/Blockout/SlackBuild @@ -10,9 +10,12 @@ VERSION=${VERSION:-1.0} ARCH=${ARCH:-${ARCH:-dosbox}} BUILD=${BUILD:-1} - PKG=$TMP/pkg-$PRGNAM +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + rm -rf $PKG $TMP/${PRGNAM}-${VERSION} mkdir -p $TMP @@ -20,8 +23,8 @@ cd $TMP mkdir -p $PKG/usr/games/ $PKG/usr/share/games/ $PKG/usr/doc/$PRGNAM cd $PKG/usr/share/games -[ ! -e $CWD/Blockout_1989.zip ] && wget -c https://cors.archive.org/cors/msdos_Blockout_1989/Blockout_1989.zip -O $CWD/Blockout_1989.zip -unzip $CWD/Blockout_1989.zip +[ ! -e $REPOSITORY/Blockout_1989.zip ] && wget -c https://cors.archive.org/cors/msdos_Blockout_1989/Blockout_1989.zip -O $REPOSITORY/Blockout_1989.zip +unzip $REPOSITORY/Blockout_1989.zip mv blkout $PRGNAM cd $PRGNAM touch $PKG/usr/share/games/Blockout/BLSCORE.IDX diff --git a/y/REminiscence_FlashBack/SlackBuild b/y/REminiscence_FlashBack/SlackBuild index cb740adf..411b2558 100755 --- a/y/REminiscence_FlashBack/SlackBuild +++ b/y/REminiscence_FlashBack/SlackBuild @@ -14,6 +14,9 @@ VERSION=0.3.7 ARCH=${ARCH:-$(uname -m)} BUILD=1 +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mtune=i686" @@ -38,19 +41,19 @@ rm -rf $PKG $TMP/${PRGNAM}-${VERSION} cd $TMP # --- TARBALL EXTRACTION,PATCH,MODIFY --- -[ ! -e $CWD/${PRGNAM}-${VERSION}.tar.bz2 ] && wget -c -O $CWD/${PRGNAM}-${VERSION}.tar.bz2 http://cyxdown.free.fr/reminiscence/REminiscence-${VERSION}.tar.bz2 -[ ! -e $CWD/flashback-x86_64.tar.gz ] & wget -c -O $CWD/flashback-x86_64.tar.gz https://lutris.net/files/games/flashback/flashback-x86_64.tar.gz +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.tar.bz2 ] && wget -c -O $REPOSITORY/${PRGNAM}-${VERSION}.tar.bz2 http://cyxdown.free.fr/reminiscence/REminiscence-${VERSION}.tar.bz2 +[ ! -e $REPOSITORY/flashback-x86_64.tar.gz ] & wget -c -O $REPOSITORY/flashback-x86_64.tar.gz https://lutris.net/files/games/flashback/flashback-x86_64.tar.gz echo "Extracting the program tarball for $PRGNAM..." -tar xf $CWD/${PRGNAM}-${VERSION}.tar.bz2 +tar xf $REPOSITORY/${PRGNAM}-${VERSION}.tar.bz2 cd ${PRGNAM}-${VERSION} chown -R root.root * find . -perm 777 -exec chmod 755 {} \; -zcat $CWD/nices_path.patch.gz | patch -p1 -#zcat $CWD/bad_crc.diff.gz | patch -p1 +zcat $REPOSITORY/nices_path.patch.gz | patch -p1 +#zcat $REPOSITORY/bad_crc.diff.gz | patch -p1 # --- BUILDING --- @@ -70,11 +73,11 @@ ln -s rs REminiscence ln -s rs flashback cd $PKG/usr/share/games/ -tar xf $CWD/flashback-x86_64.tar.gz # jeu lui-même +tar xf $REPOSITORY/flashback-x86_64.tar.gz # jeu lui-même mv flashback $PRGNAM mkdir -p $PKG/usr/share/pixmaps -cp $CWD/flashback.png $PKG/usr/share/pixmaps +cp $REPOSITORY/flashback.png $PKG/usr/share/pixmaps # --- DOCUMENTATION --- cd $TMP/${PRGNAM}-${VERSION} diff --git a/y/lutris/SlackBuild b/y/lutris/SlackBuild index 23846273..6c01c020 100755 --- a/y/lutris/SlackBuild +++ b/y/lutris/SlackBuild @@ -45,6 +45,10 @@ OUTPUT=${OUTPUT:-/tmp} DOCS="AUTHORS LICENSE INSTALL.rst README.rst" +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + set -e rm -rf $PKG @@ -52,9 +56,9 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM -[ ! -e $CWD/$PRGNAM\_$VERSION.tar.xz ] && wget -c https://lutris.net/releases/lutris_$VERSION.tar.xz -O $CWD/$PRGNAM\_$VERSION.tar.xz +[ ! -e $REPOSITORY/$PRGNAM\_$VERSION.tar.xz ] && wget -c https://lutris.net/releases/lutris_$VERSION.tar.xz -O $REPOSITORY/$PRGNAM\_$VERSION.tar.xz -tar xvf $CWD/$PRGNAM\_$VERSION.tar.xz +tar xvf $REPOSITORY/$PRGNAM\_$VERSION.tar.xz cd $PRGNAM chown -R root:root . find -L . \ diff --git a/y/minecraft-launcher/SlackBuild b/y/minecraft-launcher/SlackBuild index 21802613..fa7fd2c7 100755 --- a/y/minecraft-launcher/SlackBuild +++ b/y/minecraft-launcher/SlackBuild @@ -12,21 +12,25 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/pkg-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -[ ! -e $CWD/minecraft-launcher_${VERSION}.tar.gz ] && wget -c -O $CWD/minecraft-launcher_${VERSION}.tar.gz https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${VERSION}.tar.gz -[ ! -e $CWD/minecraft-launcher.svg ] && wget -c -O $CWD/minecraft-launcher.svg https://launcher.mojang.com/download/minecraft-launcher.svg +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + +[ ! -e $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz ] && wget -c -O $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${VERSION}.tar.gz +[ ! -e $REPOSITORY/minecraft-launcher.svg ] && wget -c -O $REPOSITORY/minecraft-launcher.svg https://launcher.mojang.com/download/minecraft-launcher.svg rm -fr $PKG mkdir -p $PKG/opt/${PRGNAM} -tar xvf $CWD/minecraft-launcher_${VERSION}.tar.gz -C $PKG/opt/ +tar xvf $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz -C $PKG/opt/ -rm $CWD/minecraft-launcher_${VERSION}.tar.gz +rm $REPOSITORY/minecraft-launcher_${VERSION}.tar.gz mkdir -p $PKG/usr/bin cd $PKG/usr/bin ln -s ../../opt/minecraft-launcher/minecraft-launcher mkdir -p $PKG/usr/share/icons/hicolor/symbolic/apps/ -cp $CWD/minecraft-launcher.svg $PKG/usr/share/icons/hicolor/symbolic/apps/ +cp $REPOSITORY/minecraft-launcher.svg $PKG/usr/share/icons/hicolor/symbolic/apps/ mkdir -p $PKG/usr/share/applications/ cat < $PKG/usr/share/applications/minecraft-launcher.desktop diff --git a/y/steam/SlackBuild b/y/steam/SlackBuild index bda1b730..5d0d363d 100755 --- a/y/steam/SlackBuild +++ b/y/steam/SlackBuild @@ -46,6 +46,10 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + set -e rm -rf $PKG @@ -53,14 +57,14 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf ${PRGNAM}-launcher -[ -e $CWD/steam_latest-$BRANCH.tar.gz ] && rm $CWD/steam_latest-$BRANCH.tar.gz -wget -c https://repo.steampowered.com/steam/archive/precise/steam_latest-$BRANCH.tar.gz -O $CWD/steam_latest-$BRANCH.tar.gz -tar xvf $CWD/steam_latest-$BRANCH.tar.gz +[ -e $REPOSITORY/steam_latest-$BRANCH.tar.gz ] && rm $REPOSITORY/steam_latest-$BRANCH.tar.gz +wget -c https://repo.steampowered.com/steam/archive/precise/steam_latest-$BRANCH.tar.gz -O $REPOSITORY/steam_latest-$BRANCH.tar.gz +tar xvf $REPOSITORY/steam_latest-$BRANCH.tar.gz cd ${PRGNAM}-launcher VERSION=$(cat client-versions.json | grep -o "[0-9.]*" | sed 'N;s/\n/_/') # Use Slackware-specific installation directories -patch -p0 < $CWD/patch-slackdirs.diff +patch -p0 < $REPOSITORY/patch-slackdirs.diff chown -R root:root . find -L . \ @@ -89,7 +93,7 @@ install -p -m 0644 subprojects/steam-devices/*.rules $PKG/lib/udev/rules.d/ sed -i -e 's/^KERNEL=="uinput".*/& GROUP="plugdev"/' $PKG/lib/udev/rules.d/60-steam-input.rules mkdir -p $PKG/usr/doc/$PRGNAM -cp subprojects/steam-devices/LICENSE $CWD/SlackBuild $PKG/usr/doc/$PRGNAM/ +cp subprojects/steam-devices/LICENSE $REPOSITORY/SlackBuild $PKG/usr/doc/$PRGNAM/ mkdir -p $PKG/install cat < $PKG/install/slack-desc