games/pybik: Fix download URL, parallel build.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-02-21 03:29:33 -05:00 committed by Robby Workman
parent 8404bfce3a
commit 5aadeb27ca
2 changed files with 31 additions and 8 deletions

View file

@ -22,6 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220221 bkw: Modified by SlackBuilds.org:
# - fix download URL
# - binary in /usr/games
# - abs paths in .desktop file
# - use parallel build (unlike most python builds, this really benefits
# from parallelism).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pybik
@ -38,9 +45,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -75,20 +79,39 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
-o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Fix man page path
sed -i "s/share\/man/man/" setup.py
# 20220221 bkw: 'generating models' takes a long time to run. it can be
# made to run multiple jobs (like make -jN). For convenience, read
# MAKEFLAGS from the environment, if set...
JOBS="$( echo $MAKEFLAGS | sed 's,.*-j *\([0-9][0-9]*\)*.*,\1,' )"
# ...or if no MAKEFLAGS, use number-of-cores minus 1...
JOBS="${JOBS:-$(( $( nproc ) - 1 ))}"
# ...or 1, if we really only have one core.
[ "$JOBS" = "0" ] && JOBS=1
# 20220221 bkw: Don't combine build and install in one step, because
# install doesn't recognize the --parallel option.
python3 setup.py build --parallel=$JOBS
python3 setup.py install --root=$PKG
mv $PKG/usr/bin $PKG/usr/games
sed -i -e '/^Exec/s,=,=/usr/games/,' \
-e '/^Icon/s,=.*,=/usr/share/pixmaps/pybik.png,' \
$PKG/usr/share/applications/*desktop
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
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
gzip $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README COPYING NEWS $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,7 +1,7 @@
PRGNAM="pybik"
VERSION="2.1"
HOMEPAGE="https://launchpad.net/pybik/"
DOWNLOAD="https://launchpad.net/pybik/trunk/2.1/+download/pybik-2.1.tar.gz"
DOWNLOAD="https://slackware.uk/~urchlay/src/pybik-2.1.tar.gz"
MD5SUM="bb551ba5c45ee834988b91ab7ff48d4f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""