diff options
Diffstat (limited to 'system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild')
-rw-r--r-- | system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild b/system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild index 7aba46f955..5ba42e6008 100644 --- a/system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild +++ b/system/samsung-mfp-drivers/samsung-mfp-drivers.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for samsung-mfp-drivers -# Copyright 2014 Robby Workman, Northport, Alabama, USA +# Copyright 2014,2021 Robby Workman, Tuscaloosa, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,38 +22,46 @@ # 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=samsung-mfp-drivers VERSION=${VERSION:-1.00.39} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +# uld_V1.00.39_01.17.tar.gz TARNAM="uld_V${VERSION}_01.17" SRCNAM="uld" if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i386 ;; - arm*) ARCH=arm ;; + i?86) ARCH=i586 ;; *) ARCH=$( uname -m ) ;; 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" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" +if [[ $ARCH = i?86 ]]; then + SRCARCH=i386 LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + SRCARCH="x86_64" else - SLKCFLAGS="-O2" + SRCARCH=i386 LIBDIRSUFFIX="" fi @@ -73,12 +81,14 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p $PKG/usr/bin -cp -a $ARCH/smfpnetdiscovery $ARCH/usbresetter $PKG/usr/bin +cp -a $SRCARCH/smfpnetdiscovery $SRCARCH/usbresetter $PKG/usr/bin mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/sane $PKG/usr/lib${LIBDIRSUFFIX}/cups/filter/ -cp -a $ARCH/libscmssc.so $PKG/usr/lib${LIBDIRSUFFIX} -cp -a $ARCH/libsane-smfp.so* $PKG/usr/lib${LIBDIRSUFFIX}/sane -cp -a $ARCH/rastertospl $ARCH/pstosecps $PKG/usr/lib${LIBDIRSUFFIX}/cups/filter/ +cp -a $SRCARCH/libscmssc.so $PKG/usr/lib${LIBDIRSUFFIX} +cp -a $SRCARCH/libsane-smfp.so* $PKG/usr/lib${LIBDIRSUFFIX}/sane +cp -a \ + $SRCARCH/rastertospl $SRCARCH/pstosecps \ + $PKG/usr/lib${LIBDIRSUFFIX}/cups/filter/ mkdir -p $PKG/usr/share cp -a noarch/share/locale $PKG/usr/share @@ -108,7 +118,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a noarch/license/* $PKG/usr/doc/$PRGNAM-$VERSION +install -m 0644 noarch/license/* -t $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/README.pdfprinterrors > $PKG/usr/doc/$PRGNAM-$VERSION/README.pdfprinterrors cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -117,4 +127,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 |