diff options
Diffstat (limited to 'graphics/mypaint/mypaint.SlackBuild')
-rw-r--r-- | graphics/mypaint/mypaint.SlackBuild | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/graphics/mypaint/mypaint.SlackBuild b/graphics/mypaint/mypaint.SlackBuild index 089622dfa1..8335dd8bee 100644 --- a/graphics/mypaint/mypaint.SlackBuild +++ b/graphics/mypaint/mypaint.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for mypaint -# Copyright 2013 klaatu klaatu@member.fsf.org +# Copyright 2013-22 klaatu klaatu@member.fsf.org # All rights reserved. # # GNU All-Permissive License @@ -11,26 +11,36 @@ # notice and this notice are preserved. This file is offered as-is, # without any warranty. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=mypaint -VERSION=${VERSION:-1.2.0} +VERSION=${VERSION:-2.0.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) 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" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -49,7 +59,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -58,27 +68,17 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Respect our $LIBDIRSUFFIX -sed -i "s|prefix/lib/|prefix/lib$LIBDIRSUFFIX/|" SCons* brushlib/SConscript -sed -i "s|'lib'|'lib$LIBDIRSUFFIX'|" $PRGNAM.py -sed -i "s|lib/pkgconfig|lib$LIBDIRSUFFIX/pkgconfig|g" brushlib/SConscript - -# Use our CFLAGS -sed -i "s|-O3|$SLKCFLAGS|g" SConstruct - -scons prefix="$PKG"/usr install - -# Stuff unused and broken -rm -fR $PKG/usr/include $PKG/usr/lib$LIBDIRSUFFIX/{libmypaint.a,pkgconfig} +python3 setup.py build +python3 setup.py install --prefix=/usr --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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - CONTRIBUTING.md COPYING Licenses.md Changelog.md DEBUGGING.md \ - README.md README_LINUX.md \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a BUILDING.md CODE_OF_CONDUCT.md CONTRIBUTING.md \ + COPYING Changelog.md DEBUGGING.md ISSUE_TEMPLATE.md \ + Licenses.dep5 Licenses.md README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -86,4 +86,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 |