aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-13 11:36:56 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-16 12:11:24 +0700
commita4a7722ee29a1b6142d07b6dc3febfb753d96b1c (patch)
treef1b6432f8d4d59f620281fd46e7e8a40c3200203 /system
parent06600687404b66b1f9a3989a819c24e5d19ac54a (diff)
system/iscan: Fix .desktop, symlink, docs.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/iscan/iscan.SlackBuild28
1 files changed, 13 insertions, 15 deletions
diff --git a/system/iscan/iscan.SlackBuild b/system/iscan/iscan.SlackBuild
index bc0698c7d09a8..3084af07555a3 100644
--- a/system/iscan/iscan.SlackBuild
+++ b/system/iscan/iscan.SlackBuild
@@ -24,12 +24,17 @@
# Shamelessly ripped from Alien Bob's script: thank him for all the hard work!
+# 20220413 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - make .desktop file validate.
+# - use relative symlink for /usr/bin.
+# - remove useless INSTALL from doc dir.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=iscan
VERSION=${VERSION:-2.30.4}
ADDVER=${ADDVER:-2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +46,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -75,7 +77,7 @@ elif [ $PNGMINOR -eq 4 ]; then
PNG_LDFLAGS="-lpng14"
fi
-DOCS="COPYING INSTALL NEWS README non-free/COPYING*.txt"
+DOCS="COPYING NEWS README non-free/COPYING*.txt"
set -e
@@ -88,9 +90,9 @@ cd $PRGNAM-$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 \
+ -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 {} \+
# Apply ArchLinux patches:
# Allow linking against libpng15 and newer:
@@ -121,7 +123,8 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
# Install the SANE backend configuration:
mkdir -p $PKG/etc/sane.d/dll.d
@@ -129,18 +132,13 @@ install -m0644 backend/epkowa.conf $PKG/etc/sane.d/epkowa.conf.new
echo "epkowa" > $PKG/etc/sane.d/dll.d/epkowa.conf
# Create the forgotten desktop menu:
+sed -i -e '/^Encoding/d' -e '/^Categories/s,Application;,,' $PRGNAM.desktop
mkdir -p $PKG/usr/share/applications
install -m0644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
# Make the GIMP aware of the iscan plugin:
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins
-ln -s /usr/bin/$PRGNAM $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins/
-
-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 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+ln -s ../../../../bin/$PRGNAM $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION