diff options
Diffstat (limited to 'python/rst-linker/rst-linker.SlackBuild')
-rw-r--r-- | python/rst-linker/rst-linker.SlackBuild | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/python/rst-linker/rst-linker.SlackBuild b/python/rst-linker/rst-linker.SlackBuild index d8f904d9cb..b0d3bee99b 100644 --- a/python/rst-linker/rst-linker.SlackBuild +++ b/python/rst-linker/rst-linker.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # SlackBuild build script for rst-linker @@ -22,11 +22,14 @@ # 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=rst-linker SRCPKG=${SRCPKG-rst.linker} VERSION=${VERSION:-2.0.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM="$(printf $SRCPKG | cut -d- -f2-)" @@ -38,8 +41,12 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) -TMP=${TMP:-/tmp} +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} @@ -54,16 +61,12 @@ cd $SRCNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -python setup.py install --root=$PKG - -# Replacement of python-2.x Python3.x check presence and build if found. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi +python2 setup.py install --root=$PKG +python3 setup.py install --root=$PKG mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README.rst $PKG/usr/doc/$PRGNAM-$VERSION @@ -73,4 +76,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 |