desktop/disper: Use python2 for python 2.x.

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2024-10-07 20:34:10 +09:00 committed by Willy Sudiarto Raharjo
parent 774d60935d
commit a62d306906
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -3,7 +3,7 @@
# Slackware build script for disper
# Copyright 2015 Markus Hutmacher Germany
# Copyright 2023 Andrew Clemons, Tokyo Japan
# Copyright 2023-2024 Andrew Clemons, Tokyo Japan
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=disper
VERSION=${VERSION:-0.3.1.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -64,11 +64,15 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# We need to change PREFIX from /usr/local to /usr
sed -i 's&usr/local&usr&' Makefile
sed -i 's,usr/local,usr,' Makefile
# use python2
sed -i 's,`src/disper.py,`python2 src/disper.py,' Makefile
make
make install DESTDIR=$PKG
find $PKG -type f -exec sed -i "s,/usr/bin/python$,/usr/bin/python2,;s,/usr/bin/env python$,/usr/bin/env python2," {} +
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