|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2017,2019 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2017,2019,2020 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -22,14 +22,12 @@
|
|
|
|
|
# |
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
|
# |
|
|
|
|
# Latest sabyenc sourcecode is available at: <https://sabnzbd.org/>? |
|
|
|
|
# Latest sabyenc sourcecode is available at: <https://sabnzbd.org/>. |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-sabyenc} |
|
|
|
|
VERSION=${VERSION:-3.3.6} |
|
|
|
|
NAMESRC=${NAMESRC:-sabyenc3} |
|
|
|
|
VERSION=${VERSION:-4.0.2} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
VERSION3=${VERSION3:-4.0.1} |
|
|
|
|
ARCHIVE3=${ARCHIVE3:-${NAMESRC}3-$VERSION3.tar.gz} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-sabyenc} |
|
|
|
@ -60,30 +58,17 @@ fi
|
|
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
|
pip3 download --no-binary :all: --no-deps $NAMESRC==$VERSION |
|
|
|
|
fi |
|
|
|
|
if [ ! -r $ARCHIVE3 ]; then |
|
|
|
|
pip3 download --no-binary :all: --no-deps ${NAMESRC}3==$VERSION3 |
|
|
|
|
fi |
|
|
|
|
sha256sum -c checksums |
|
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
NAME3=$(tar ft $ARCHIVE3 | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile the Python 2 version |
|
|
|
|
# Compile |
|
|
|
|
cd $TMP |
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
python2 setup.py build |
|
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
|
install -D -m 644 README.md $PKG/usr/doc/$NAME/README.md |
|
|
|
|
|
|
|
|
|
# And now the Python 3 version |
|
|
|
|
cd $TMP |
|
|
|
|
echo "Building $ARCHIVE3" |
|
|
|
|
tar xf $CWD/$ARCHIVE3 |
|
|
|
|
cd $NAME3 |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
install -m 544 README.md $PKG/usr/doc/$NAME/README.$NAME3.md |
|
|
|
|
install -D -m 644 README.md $PKG/usr/doc/$NAME/README.md |
|
|
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
|
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
@ -99,7 +84,7 @@ PACKAGING="
|
|
|
|
|
chown root:root . -R |
|
|
|
|
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT |
|
|
|
|
rm -rf $PKG |
|
|
|
|
rm -rf $TMP/$NAME $TMP/$NAME3 |
|
|
|
|
rm -rf $TMP/$NAME |
|
|
|
|
" |
|
|
|
|
if type -p fakeroot ; then |
|
|
|
|
echo "$PACKAGING" | fakeroot |
|
|
|
|