summaryrefslogtreecommitdiffstats
path: root/python/python-magic
diff options
context:
space:
mode:
Diffstat (limited to 'python/python-magic')
-rw-r--r--python/python-magic/README12
-rw-r--r--python/python-magic/python-magic.SlackBuild25
-rw-r--r--python/python-magic/python-magic.info10
3 files changed, 22 insertions, 25 deletions
diff --git a/python/python-magic/README b/python/python-magic/README
index 1746883091..586e8fe552 100644
--- a/python/python-magic/README
+++ b/python/python-magic/README
@@ -1,9 +1,3 @@
-This module uses ctypes to access the libmagic file type identification
-library. It makes use of the local magic database and supports both textual
-and MIME-type output.
-
-Optional dependency: python3
-
-Note: To install python3 bindings pass PYTHON3=yes to the slackbuild.
-
- # PYTHON3=yes ./python-magic.SlackBuild
+This module uses ctypes to access the libmagic file type
+identification library. It makes use of the local magic database and
+supports both textual and MIME-type output.
diff --git a/python/python-magic/python-magic.SlackBuild b/python/python-magic/python-magic.SlackBuild
index ea78af0ed1..f2f5733870 100644
--- a/python/python-magic/python-magic.SlackBuild
+++ b/python/python-magic/python-magic.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for python-magic
+# Copyright 2023 Steven Voges <Oregon, USA>
# Copyright 2009-2018 Larry Hajali <larryhaja[at]gmail[dot]com>
# All rights reserved.
#
@@ -22,20 +23,27 @@
# 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=python-magic
-VERSION=${VERSION:-0.4.15}
+VERSION=${VERSION:-0.4.27}
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 [ ! -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}
@@ -56,12 +64,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python2 setup.py install --root=$PKG
-
-# Install for python3. Default is no.
-if [ "${PYTHON3:-no}" == "yes" ]; then
- rm -rf build
- python3 setup.py install --root=$PKG
-fi
+python3 setup.py install --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
@@ -74,4 +77,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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
diff --git a/python/python-magic/python-magic.info b/python/python-magic/python-magic.info
index fae47a05d5..35bf9963b7 100644
--- a/python/python-magic/python-magic.info
+++ b/python/python-magic/python-magic.info
@@ -1,10 +1,10 @@
PRGNAM="python-magic"
-VERSION="0.4.15"
+VERSION="0.4.27"
HOMEPAGE="https://github.com/ahupp/python-magic"
-DOWNLOAD="https://pypi.io/packages/source/p/python-magic/python-magic-0.4.15.tar.gz"
-MD5SUM="e384c95a47218f66c6501cd6dd45ff59"
+DOWNLOAD="https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz"
+MD5SUM="5ec09788e8dce05dfd4fd5345153f8a9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Larry Hajali"
-EMAIL="larryhaja[at]gmail[dot]com"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"