diff options
Diffstat (limited to '')
-rwxr-xr-x | source/l/python-sane/python-sane.SlackBuild (renamed from source/l/pyrex/pyrex.SlackBuild) | 54 | ||||
-rw-r--r-- | source/l/python-sane/slack-desc | 19 |
2 files changed, 45 insertions, 28 deletions
diff --git a/source/l/pyrex/pyrex.SlackBuild b/source/l/python-sane/python-sane.SlackBuild index 94b34c2eb..4e296a2c6 100755 --- a/source/l/pyrex/pyrex.SlackBuild +++ b/source/l/python-sane/python-sane.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2007 David Somero <dsomero@hotmail.com> -# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010, 2013, 2014, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2014 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,23 +21,32 @@ # 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) -PKGNAM=Pyrex -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +PKGNAM=python-sane +VERSION=${VERSION:-$(echo Sane-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi -if [ "${ARCH}" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +# 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +if [ "${ARCH}" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -48,22 +57,18 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-Pyrex +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf Pyrex-$VERSION -tar xvf $CWD/Pyrex-$VERSION.tar.?z* || exit 1 -cd Pyrex-$VERSION +rm -rf Sane-$VERSION +tar xvf $CWD/Sane-$VERSION.tar.*z* || exit 1 +cd Sane-$VERSION chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -72,26 +77,19 @@ find . \ -exec chmod 644 {} \; python setup.py install --root=$PKG || exit 1 +python3 setup.py install --root=$PKG || exit 1 find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -mkdir -p $PKG/usr/doc/Pyrex-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - README* INSTALL* USAGE* ToDo* \ - $PKG/usr/doc/Pyrex-$VERSION - -# If there's a ChangeLog, installing at least part of the recent history -# is useful, but don't let it get totally out of control: -if [ -r CHANGES.txt ]; then - DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) - cat CHANGES.txt | head -n 1000 > $DOCSDIR/CHANGES.txt - touch -r CHANGES.txt $DOCSDIR/CHANGES.txt -fi + *.md *.rst COPYING \ + $PKG/usr/doc/$PKGNAM-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/pyrex-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/l/python-sane/slack-desc b/source/l/python-sane/slack-desc new file mode 100644 index 000000000..e8c0a1ce9 --- /dev/null +++ b/source/l/python-sane/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +python-sane: python-sane (SANE interface for python) +python-sane: +python-sane: The SANE module provides an interface to the SANE scanner and frame +python-sane: grabber interface for Linux. +python-sane: +python-sane: Homepage: https://github.com/python-pillow/Sane +python-sane: +python-sane: +python-sane: +python-sane: +python-sane: |