multimedia/pipe-viewer: Clean up build, make noarch.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-01-03 16:53:16 -05:00 committed by Willy Sudiarto Raharjo
parent deaaec7a63
commit c4849e527b
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 22 additions and 22 deletions

View file

@ -0,0 +1,10 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View file

@ -6,21 +6,20 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230103 bkw: v0.4.4 BUILD=2:
# - size icons correctly.
# - include doinst.sh if gtk frontend built.
# - ARCH=noarch, there's no lib vs. lib64 or compiled code here.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pipe-viewer
VERSION=${VERSION:-0.4.4}
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"
@ -31,19 +30,7 @@ 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
# No SLKCFLAGS or LIBDIRSUFFIX needed (pure perl).
set -e
@ -99,7 +86,7 @@ if [ "$BUILD_GTK" = "yes" ]; then
size=${px}x${px}
dir=$PKG/usr/share/icons/hicolor/$size/apps
mkdir -p $dir
convert -resize $size share/icons/gtk-pipe-viewer.png $dir/gtk-$PRGNAM.png
convert -resize $size! share/icons/gtk-pipe-viewer.png $dir/gtk-$PRGNAM.png
done
ln -s ../icons/hicolor/48x48/apps/gtk-$PRGNAM.png \
@ -109,6 +96,9 @@ if [ "$BUILD_GTK" = "yes" ]; then
if [ "$TERMINAL" != "" ]; then
sed -i "s/'gnome-terminal'/'$TERMINAL', &/" $PKG/usr/bin/gtk-$PRGNAM
fi
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
fi
find $PKG -name perllocal.pod \