#!/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 python2-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 get updated # and python2-configobj will stay at 5.0.9 (if we still need it, by then). cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-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 tar xvfC $CWD/$SRCNAM-$VERSION-prebuilt-docs.tar.xz $SRCNAM-$VERSION 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 {} + python3 setup.py install --root=$PKG # Note: API docs in this package were built by extracting the source # and running "make -C docs html" on a box with Sphinx installed. # To avoid a Sphinx dep, I'm providing them prebuilt. PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC cp -a CHANGES.rst README.md LICENSE docs/_build/html $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