#!/bin/bash # Slackware build script for kmscon # Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20250817 bkw: # - update for v9.1.0 (libtsm v4.1.0). # - add python3-meson-opt to REQUIRES, remove meson-compat.diff. # 20230722 bkw: switch to Aetf's fork, which looks actively # maintained. Thanks to lockywolf for finding it. Also, include # libtsm here instead of as a separate build: it's been on SBo for ~9 # years and nothing but this ever depended on it. # 20210825 bkw: update to the last git commit, post v8 release. It's from # 2014, so I doubt there will be more version updates. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=kmscon VERSION=${VERSION:-9.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} LIBNAM=libtsm LIBVER=${LIBVER:-4.1.0} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi 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 # 20250817 bkw: meson can't easily be coerced to ignore the libs # in /usr/lib64 if already installed. just punt, if the old libs # are there. if pkg-config --exists libtsm && ! pkg-config --exact-version=$LIBVER libtsm; then cat < $PKG/etc/$PRGNAM/$PRGNAM.conf.new cp -a COPYING NEWS README* docs/*.txt $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install 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