summaryrefslogtreecommitdiffstats
path: root/office/krop/krop.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/krop/krop.SlackBuild')
-rw-r--r--office/krop/krop.SlackBuild49
1 files changed, 20 insertions, 29 deletions
diff --git a/office/krop/krop.SlackBuild b/office/krop/krop.SlackBuild
index 9c49d8e7cd..44d0c56cb5 100644
--- a/office/krop/krop.SlackBuild
+++ b/office/krop/krop.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for krop
-# Copyright 2018, Alexander Verbovetsky, Moscow, Russia
+# Copyright 2018-2024, Alexander Verbovetsky, Moscow, Russia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=krop
-VERSION=${VERSION:-0.5.1}
+VERSION=${VERSION:-0.6.1_e96d42b}
+COMMIT="e96d42b2f1ab4317efe37cab498b708663bc104c"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,33 +39,23 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
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
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$COMMIT
+tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz
+cd $PRGNAM-$COMMIT
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,11 +63,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-sed -i 's/import sys.*/&\nsys.argv.append("--no-qt5")/' krop/config.py
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
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
@@ -81,8 +71,9 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/usr/share/applications
install -m 0644 -o root -g root krop.desktop $PKG/usr/share/applications/
-mkdir -p $PKG/usr/man/man1
-gzip -c9 krop.1 > $PKG/usr/man/man1/krop.1.gz
+mv $PKG/usr/share/man $PKG/usr
+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
cp -a ChangeLog README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION
@@ -93,4 +84,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE