summaryrefslogtreecommitdiffstats
path: root/graphics/viewnior/viewnior.SlackBuild
diff options
context:
space:
mode:
author B. Watson2020-03-05 00:08:44 +0100
committer Willy Sudiarto Raharjo2020-03-07 08:06:33 +0100
commit7e7c72981c937a323644bec8fe19d07b5f6d26e2 (patch)
treec738885b64f645fec213959feccdc929d0bd6d48 /graphics/viewnior/viewnior.SlackBuild
parent238c1dbc18585ac5922af735509c8d2d000aa813 (diff)
downloadslackbuilds-7e7c72981c937a323644bec8fe19d07b5f6d26e2.tar.gz
graphics/viewnior: New maintainer, minor fix.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'graphics/viewnior/viewnior.SlackBuild')
-rw-r--r--graphics/viewnior/viewnior.SlackBuild41
1 files changed, 23 insertions, 18 deletions
diff --git a/graphics/viewnior/viewnior.SlackBuild b/graphics/viewnior/viewnior.SlackBuild
index 0fea2c8991..93ea00019a 100644
--- a/graphics/viewnior/viewnior.SlackBuild
+++ b/graphics/viewnior/viewnior.SlackBuild
@@ -2,8 +2,9 @@
#
# Slackware build script for viewnior.
#
-# Written by Šime Ramov <s@ramov.com>
+# Written by Šime Ramov <email removed>
# Copyright 2016-2018 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,11 +24,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200304 bkw:
+# - take over maintenance
+# - use proper github URL
+# - fix typos (It's => Its), BUILD=2
+# - fix permissions (svg icon in package was +x)
+# - tighten up script a bit
+
PRGNAM=viewnior
VERSION=${VERSION:-1.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+SRCNAM=Viewnior-$PRGNAM
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -60,16 +70,15 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xzvf $CWD/Viewnior-$PRGNAM-$VERSION.tar.gz
-mv Viewnior-$PRGNAM-$VERSION $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z
+cd $SRCNAM-$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 \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+# 20200304 bkw: upstream perms suck, do not revert to template:
+find -L . -type d -a -exec chmod 755 {} + -o \
+ -type f -a -exec chmod 644 {} +
+
+sed -i "s,It's,Its," man/$PRGNAM.1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -82,15 +91,11 @@ meson \
ninja -C build
DESTDIR=$PKG ninja -C build install
-
-find $PKG | xargs 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
+strip $PKG/usr/bin/$PRGNAM
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp AUTHORS COPYING NEWS README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING NEWS README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install