summaryrefslogtreecommitdiff
path: root/source/d/Cython/Cython.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/Cython/Cython.SlackBuild')
-rwxr-xr-xsource/d/Cython/Cython.SlackBuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/source/d/Cython/Cython.SlackBuild b/source/d/Cython/Cython.SlackBuild
index 11716068..c3924c69 100755
--- a/source/d/Cython/Cython.SlackBuild
+++ b/source/d/Cython/Cython.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Cython
@@ -22,8 +22,10 @@
# 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)
+
PKGNAM=Cython
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
@@ -34,29 +36,22 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
@@ -66,6 +61,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+python3 setup.py install --root=$PKG --prefix=/usr || exit 1
+
+for i in cython cythonize cygdb; do
+ mv $PKG/usr/bin/$i $PKG/usr/bin/${i}3
+done
+
python setup.py install --root=$PKG --prefix=/usr || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \