2021-07-04 01:48:15 +08:00
|
|
|
#!/bin/bash
|
2010-04-20 12:01:53 +08:00
|
|
|
|
|
|
|
# Slackware build script for configobj
|
|
|
|
|
2021-11-22 02:45:06 +08:00
|
|
|
# Written by Luis Henrique <email removed>
|
2010-04-20 12:01:53 +08:00
|
|
|
|
2014-09-16 08:44:50 +08:00
|
|
|
# Modified by B. Watson <yalhcru@gmail.com>
|
2020-01-18 11:24:25 +08:00
|
|
|
|
2020-08-12 05:29:17 +08:00
|
|
|
# 20200811 bkw: add missing "six" dep, pointed out by jc_anatole
|
2020-01-18 11:24:25 +08:00
|
|
|
# 20200117 bkw: update for v5.0.6
|
2014-09-16 08:44:50 +08:00
|
|
|
# 20140915 bkw:
|
|
|
|
# - Took over maintenance
|
|
|
|
# - Exclude __MACOSX dir from unzip command
|
|
|
|
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2021-07-04 17:41:06 +08:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2010-04-20 12:01:53 +08:00
|
|
|
PRGNAM=configobj
|
2020-01-18 11:24:25 +08:00
|
|
|
VERSION=${VERSION:-5.0.6}
|
2010-04-20 12:01:53 +08:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 18:23:38 +08:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2010-04-20 12:01:53 +08:00
|
|
|
|
2016-08-19 17:14:37 +08:00
|
|
|
# ARCH doesn't really matter except x86_64 will get stuff
|
|
|
|
# installed to lib64. We don't need LIBDIRSUFFIX because setup.py
|
|
|
|
# already knows to do this.
|
2010-06-04 13:06:16 +08:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2016-08-19 17:14:37 +08:00
|
|
|
i?86) ARCH=i586 ;;
|
2010-06-04 13:06:16 +08:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2021-07-04 18:23:38 +08:00
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2010-04-20 12:01:53 +08:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2013-11-22 15:34:22 +08:00
|
|
|
set -e
|
2010-04-20 12:01:53 +08:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2014-09-16 08:44:50 +08:00
|
|
|
rm -rf $PRGNAM-$VERSION
|
2020-01-18 11:24:25 +08:00
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
2010-04-20 12:01:53 +08:00
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2020-01-18 11:24:25 +08:00
|
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
|
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
2010-04-20 12:01:53 +08:00
|
|
|
|
|
|
|
python setup.py install --root=$PKG
|
|
|
|
|
2020-01-18 11:24:25 +08:00
|
|
|
which python3 &> /dev/null && python3 setup.py install --root=$PKG
|
|
|
|
|
2012-12-27 14:49:35 +08:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2020-01-18 11:24:25 +08:00
|
|
|
[ -d docs ] && cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
|
2012-12-27 14:49:35 +08:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
2010-04-20 12:01:53 +08:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 18:23:38 +08:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|