This commit is contained in:
Gwenhael Le Moine 2020-06-08 11:36:50 +02:00
parent b78ba89932
commit fab5683ef7
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -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