summaryrefslogtreecommitdiffstats
path: root/graphics/xmedcon/xmedcon.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/xmedcon/xmedcon.SlackBuild')
-rw-r--r--graphics/xmedcon/xmedcon.SlackBuild34
1 files changed, 21 insertions, 13 deletions
diff --git a/graphics/xmedcon/xmedcon.SlackBuild b/graphics/xmedcon/xmedcon.SlackBuild
index 74c04c01e5..9ffc6533da 100644
--- a/graphics/xmedcon/xmedcon.SlackBuild
+++ b/graphics/xmedcon/xmedcon.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for (X)MedCon
#
-# Copyright 2016-2021 Marek Srejma (sam@modweb.de)
+# Copyright 2016-2023 Marek Šrejma <marek@modweb.de>, Germany
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# 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=xmedcon
-VERSION=${VERSION:-0.17.0}
+VERSION=${VERSION:-0.23.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,18 +38,22 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=$ARCH -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
+elif [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "aarch64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
@@ -95,8 +102,9 @@ do
rm $i
done
+rm -f $PKG/usr/lib$LIBDIRSUFFIX/libmdc.la
+
mv $PKG/usr/etc $PKG/
-mv $PKG/etc/xmedconrc $PKG/etc/xmedconrc.new
mkdir -p $PKG/usr/share/pixmaps
cp -a etc/xmedcon.png $PKG/usr/share/pixmaps
@@ -106,7 +114,7 @@ install -m644 $CWD/xmedcon.desktop $PKG/usr/share/applications/xmedcon.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING COPYING.LIB INSTALL NEWS README REMARKS \
+ AUTHORS COPYING COPYING.LIB NEWS README REMARKS \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -115,4 +123,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