misc/pokemon-colorscripts: Switch to noarch.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Steven Voges 2023-05-17 22:19:14 +01:00 committed by Willy Sudiarto Raharjo
parent c758988885
commit 53373c705d
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 6 additions and 30 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh
# Print a random pokemon for interactive shells:
# Print a random pokémon for interactive shells:
case $- in
*i* ) # We're interactive

View file

@ -27,17 +27,10 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pokemon-colorscripts
VERSION=${VERSION:-20221028_0483c85}
SRCVER=${SRCVER:-0483c85b93362637bdd0632056ff986c07f30868}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
ARCH=noarch
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
@ -48,20 +41,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
@ -73,9 +52,9 @@ cd $PRGNAM-$SRCVER
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 {} \+
mkdir -p $PKG/usr/bin
install -vDm755 ${PRGNAM}.py $PKG/usr/share/$PRGNAM/${PRGNAM}.py
@ -92,10 +71,7 @@ install -vDm644 colorscripts/large/shiny/* -t \
install -vDm644 ${PRGNAM}.1 $PKG/usr/man/man1/${PRGNAM}.1
ln -s ../share/$PRGNAM/${PRGNAM}.py $PKG/usr/bin/$PRGNAM
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 {} \;
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION