aboutsummaryrefslogtreecommitdiff
path: root/python/python2-configobj/python2-configobj.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-10-08 11:02:29 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-10-11 11:48:39 +0700
commite89e7191bbf60f0bd3e4c8a553d8be00f8b88cae (patch)
treefae86ec5a81d069cb65d2cfb5d74a0f795c8b99a /python/python2-configobj/python2-configobj.SlackBuild
parente9ce9bf4bbb325d5e07078fb75520064fde8cf1a (diff)
python/python2-configobj: Added (Python2 version of configobj).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python2-configobj/python2-configobj.SlackBuild')
-rw-r--r--python/python2-configobj/python2-configobj.SlackBuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/python/python2-configobj/python2-configobj.SlackBuild b/python/python2-configobj/python2-configobj.SlackBuild
new file mode 100644
index 0000000000..4331fd690c
--- /dev/null
+++ b/python/python2-configobj/python2-configobj.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# Slackware build script for python2-configobj
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This and python3-configobj replace the old libraries/configobj,
+# split into separate py2 and py3, and put in the python/ category.
+
+# Upstream's CHANGES.rst claims that configobj-5.0.9 drops support for
+# python2, but that's not actually true. Most likely, when/if 5.0.10
+# comes out, it really will drop python2, so this build will stay at
+# 5.0.9 (if we still need it, by then).
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python2-configobj
+SRCNAM=configobj
+VERSION=${VERSION:-5.0.9}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# Pure python code, no need for CFLAGS or LIBDIRSUFFIX.
+# We can't use noarch, since python modules go in either lib or lib64.
+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}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+python2 setup.py install --root=$PKG
+
+# Note: no API docs in this package. They're in the python3-configobj package.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGES.rst README.md LICENSE $PKGDOC
+cat $CWD/README > $PKGDOC/README
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+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