summaryrefslogtreecommitdiff
path: root/graphics/viewnior/viewnior.SlackBuild
diff options
context:
space:
mode:
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