summaryrefslogtreecommitdiff
path: root/source/d/python/python.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/d/python/python.SlackBuild
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/d/python/python.SlackBuild')
-rwxr-xr-xsource/d/python/python.SlackBuild48
1 files changed, 32 insertions, 16 deletions
diff --git a/source/d/python/python.SlackBuild b/source/d/python/python.SlackBuild
index debd7e95..220f3f02 100755
--- a/source/d/python/python.SlackBuild
+++ b/source/d/python/python.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-2.6.6}
-BUILD=${BUILD:-1}
+PKGNAM=python
+SRCNAM=Python
+VERSION=$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BRANCH_VERSION=$(echo $VERSION | cut -f 1,2 -d . )
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -38,7 +41,7 @@ fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-python
+PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -57,22 +60,23 @@ elif [ "$ARCH" = "armel" ]; then
fi
# Location for Python site-packages:
-SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/python2.6/site-packages
+SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
# same as above without $PKG
-TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/python2.6/site-packages
+TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
cd $TMP
-rm -rf Python-$VERSION
-tar xf $CWD/Python-$VERSION.tar.?z* || exit 1
-cd Python-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
+cd $SRCNAM-$VERSION
zcat $CWD/python.readline.set_pre_input_hook.diff.gz | patch -p1 --verbose || exit 1
+# We don't want a large libpython*.a:
+zcat $CWD/python.no-static-library.diff.gz | patch -p1 --verbose || exit 1
if [ "$ARCH" = "x86_64" ]; then
- # Install to lib64 instead of lib:
- zcat $CWD/python.x86_64.diff.gz | patch -p1 --verbose || exit 1
- # Python must report /usr/lib64/python2.6/site-packages as python_lib_dir:
- zcat $CWD/python.pure64.diff.gz | patch -p1 --verbose || exit 1
+ # Install to lib64 instead of lib and
+ # Python must report /usr/lib64/python2.7/site-packages as python_lib_dir:
+ zcat $CWD/python.x86_64.diff.gz | patch -p1 --verbose || exit 1
fi
chown -R root:root .
@@ -87,7 +91,6 @@ find . \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--docdir=/usr/doc/python-$VERSION \
- --with-ncurses \
--with-threads \
--enable-ipv6 \
--enable-shared \
@@ -112,7 +115,6 @@ mv $SITEPK/README $PKG/usr/doc/python-$VERSION/README.python-tools
# Make a few useful symlinks:
mkdir -p $PKG/usr/bin
( cd $PKG/usr/bin
- ln -sf $TOOLSDIR/modulator/modulator.py modulator
ln -sf $TOOLSDIR/pynche/pynche pynche
ln -sf $TOOLSDIR/i18n/msgfmt.py .
ln -sf $TOOLSDIR/i18n/pygettext.py .
@@ -126,9 +128,17 @@ tar xf $CWD/python-$VERSION-docs-text.tar.?z*
mv python-${VERSION}-docs-text/* $PKG/usr/doc/python-$VERSION/Documentation
chown -R root:root $PKG/usr/doc/python-$VERSION
+# Fix possible incorrect permissions:
+( cd $PKG
+ find . -type d -exec chmod 755 "{}" \;
+ find . -perm 640 -exec chmod 644 "{}" \;
+ find . -perm 750 -exec chmod 755 "{}" \;
+)
+
+
( cd $PKG/usr/bin
rm -f python
- ln -sf python2.6 python
+ ln -sf python${BRANCH_VERSION} python
)
( cd $PKG
@@ -143,6 +153,12 @@ chown -R root:root $PKG/usr/doc/python-$VERSION
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
+( cd $PKG/usr/man
+ if [ -r python${BRANCH_VERSION}.1.gz ] ; then
+ ln -sf python${BRANCH_VERSION}.1.gz python.1.gz
+ fi
+)
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc