From fab5683ef79d3fbe265374d120101f34bd3b7467 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 8 Jun 2020 11:36:50 +0200 Subject: [PATCH] leocad --- xap/leocad/SlackBuild | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/xap/leocad/SlackBuild b/xap/leocad/SlackBuild index 1461fa3f..0eff11c7 100755 --- a/xap/leocad/SlackBuild +++ b/xap/leocad/SlackBuild @@ -27,7 +27,7 @@ VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d cp -R $REPOSITORY $TMP/$PRGNAM cd $TMP/$PRGNAM/ -qmake-qt5 DISABLE_UPDATE_CHECK=1 DOCS_DIR=/usr/doc/$PRGNAM-$VERSION MAN_DIR=/usr/man/man1 leocad.pro +qmake-qt5 DISABLE_UPDATE_CHECK=1 DOCS_DIR=/usr/doc/$PRGNAM MAN_DIR=/usr/man/man1 leocad.pro CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ make @@ -41,16 +41,15 @@ cp -a docs/leocad.1 $PKG/usr/man/man1 find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -LIBRARY_VERSION=$(curl -s https://api.github.com/repos/leozide/leocad/releases | grep -o "/Library-Linux-[0-9]*.zip" | head -n1 | grep -o "[0-9]*") -[ ! -e $CWD/Library-Linux-${LIBRARY_VERSION}.zip ] && https://github.com/leozide/leocad/releases/download/v18.02/Library-Linux-${LIBRARY_VERSION}.zip +LIBRARY_URL=$(curl -s https://api.github.com/repos/leozide/leocad/releases | grep -o "http.*Library-Linux.*zip" | head -n1) +LIBRARY_FILE=$(echo $LIBRARY_URL | grep -o "Library-Linux-[0-9]*.zip") +LIBRARY_VERSION=$(echo $LIBRARY_FILE | grep -o "[0-9]*") +[ ! -e $CWD/$LIBRARY_FILE ] && wget -c -O $CWD/$LIBRARY_FILE $LIBRARY_URL + # Data from zip-file + set permissions mkdir -p $PKG/usr/share/leocad -unzip $CWD/Library-Linux-$LIBRARY_VERSION.zip -d $PKG/usr/share/leocad +unzip $CWD/$LIBRARY_FILE -d $PKG/usr/share/leocad chown -R root:root $PKG -find $PKG -type f -exec chmod 644 {} \; - -mkdir -p $PKG/usr/doc/$PRGNAM -cp -a docs/CREDITS.txt docs/README.txt docs/COPYING.txt $PKG/usr/doc/$PRGNAM # correction cd $PKG @@ -92,4 +91,4 @@ EOF # empaquetage cd $PKG rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la -makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz +makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo ${VERSION}_${LIBRARY_VERSION} | sed 's/-//g')-$ARCH-$BUILD$TAG.txz