diff options
author | Edinaldo P. Silva <edps.mundognu@gmail.com> | 2017-02-19 08:44:50 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-21 16:44:38 +0700 |
commit | 9a3fa7fe14e71a03e47451a855b70cd3b8175f08 (patch) | |
tree | 0d53990260898cfb6bac249423e602de9b7bc77e /development | |
parent | 803f9966219cfcd4ed703fae79dfcbfe782acd9a (diff) | |
download | slackbuilds-9a3fa7fe14e71a03e47451a855b70cd3b8175f08.tar.gz |
development/mutagen: Add python3 support.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/mutagen/README | 5 | ||||
-rw-r--r-- | development/mutagen/mutagen.SlackBuild | 23 |
2 files changed, 18 insertions, 10 deletions
diff --git a/development/mutagen/README b/development/mutagen/README index 5b8c99a568..329c1348db 100644 --- a/development/mutagen/README +++ b/development/mutagen/README @@ -13,3 +13,8 @@ individual packet/page level. Mutagen works with Python 2.7, 3.3+ and has no dependencies outside the Python standard library. + +NOTE: to build mutagen with python3 run the slackbuild with option +PYTHON3=yes. + + # PYTHON3=yes ./mutagen.SlackBuild diff --git a/development/mutagen/mutagen.SlackBuild b/development/mutagen/mutagen.SlackBuild index a31547239c..8fdf5c12c3 100644 --- a/development/mutagen/mutagen.SlackBuild +++ b/development/mutagen/mutagen.SlackBuild @@ -2,7 +2,7 @@ # # Slackware build script for mutagen. # -# Copyright 2016-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# Copyright 2016-2017 Edinaldo P. Silva, Rio de Janeiro, Brazil. # Copyright 2016 Dugan Chen (thedoogster [at] gmail [dot] [com]) # Copyright 2008 Frank Caraballo <fecaraballo{at}gmail{dot}com> # All rights reserved. @@ -26,7 +26,7 @@ PRGNAM=mutagen VERSION=${VERSION:-1.36.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -63,9 +63,10 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$SRCVER +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz -cd $PRGNAM-$SRCVER +mv $PRGNAM-$SRCVER $PRGNAM-$VERSION +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -73,19 +74,21 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ python setup.py build python setup.py install --root $PKG +# Build mutagen with python3. Default is no. +if [ "${PYTHON3:-no}" == "yes" ]; then + python3 setup.py build + python3 setup.py install --root=$PKG +fi + # Move man page(s) to correct location: mv $PKG/usr/share/man $PKG/usr/man rm -rf $PKG/usr/share -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING NEWS README.rst docs/ $PKG/usr/doc/$PRGNAM-$VERSION |