diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-11-02 21:52:53 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-11-02 21:52:53 +0000 |
commit | 907e35f3faf87a7d1bffd70b62462f9e561c9769 (patch) | |
tree | 432d06309e13bbedf705162bbd3504668e9b47f5 /patches/python | |
parent | 2581702727bb241df7a2d553132c4970fce68aef (diff) | |
download | slackbuilds-907e35f3faf87a7d1bffd70b62462f9e561c9769.tar.gz slackbuilds-907e35f3faf87a7d1bffd70b62462f9e561c9769.tar.bz2 |
added patches/python
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@571 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/python')
-rw-r--r-- | patches/python/Python-2.3.3-dirs.patch.gz | bin | 0 -> 351 bytes | |||
-rw-r--r-- | patches/python/Python-2.4c1-multilib.patch.gz | bin | 0 -> 3823 bytes | |||
-rwxr-xr-x | patches/python/python.SlackBuild | 162 | ||||
-rw-r--r-- | patches/python/slack-desc | 19 |
4 files changed, 181 insertions, 0 deletions
diff --git a/patches/python/Python-2.3.3-dirs.patch.gz b/patches/python/Python-2.3.3-dirs.patch.gz Binary files differnew file mode 100644 index 00000000..f788bc68 --- /dev/null +++ b/patches/python/Python-2.3.3-dirs.patch.gz diff --git a/patches/python/Python-2.4c1-multilib.patch.gz b/patches/python/Python-2.4c1-multilib.patch.gz Binary files differnew file mode 100644 index 00000000..96b9c565 --- /dev/null +++ b/patches/python/Python-2.4c1-multilib.patch.gz diff --git a/patches/python/python.SlackBuild b/patches/python/python.SlackBuild new file mode 100755 index 00000000..5fcbbdcc --- /dev/null +++ b/patches/python/python.SlackBuild @@ -0,0 +1,162 @@ +#!/bin/bash +# +# slackbuild script for python +# got it from ftp://ftp.slackware.com/pub/slackware/slackware-11.0/source/d/python/ +# small changes by rhatto at riseup.net +# + +if [ -s "slack-required" ]; then + echo Recomended and required packages for building cairo are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi +fi + +CWD="`pwd`" + +if [ -f "/etc/slackbuildrc" ]; then + source /etc/slackbuildrc +fi + +if [ -f "~/.slackbuildrc" ]; then + source ~/.slackbuildrc +fi + +PACKAGE="python" +VERSION=${VERSION:=2.4.4} +ARCH=${ARCH:=i486} +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC:=$CWD} +TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} + +# ------- error codes for createpkg -------------- +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40 + +RTOOL="wget" +PACKAGE_EXT="bz2" +SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" +URL="http://www.python.org/ftp/python/$VERSION/$SRC" +HTML="html-2.4.4.tar.bz2" +HTML_URL="http://www.python.org/ftp/python/doc/$VERSION/$HTML" + +SRC_DIR="$SRC_DIR/$PACKAGE" +mkdir -p $SRC_DIR + +if [ "$RTOOL" == "wget" ]; then + if [ ! -f "$SRC_DIR/$SRC" ]; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET + fi + if [ ! -f "$SRC_DIR/$HTML" ]; then + wget "$HTML_URL" -O "$SRC_DIR/$HTML" || exit $ERROR_WGET + fi +fi + +TMP=$TMP/$PACKAGE +PKG=$TMP/package-$PACKAGE +rm -rf $TMP +mkdir -p $PKG + +# Location for Python site-packages: +SITEPK=$PKG/usr/lib/python2.4/site-packages +# same as above without $PKG +TOOLSDIR=/usr/lib/python2.4/site-packages + +LIBDIR=/usr/lib + +# Normally I don't trust -O3, but it is the Python default so +# I'll assume that in this case it has been well tested. +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O3 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O3 -march=i486 -mtune=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O3" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O3" + LIBDIR="/usr/lib64" +fi + +cd $TMP +rm -rf Python-$VERSION +tar xjvf $CWD/Python-$VERSION.tar.bz2 || exit $ERROR_TAR +cd Python-$VERSION +chown -R root:root . +find . -type d -exec chmod 755 {} \; +find . -type f -perm 775 -exec chmod 755 {} \; +find . -type f -perm 664 -exec chmod 644 {} \; +find . -type d -name CVS -exec rm -r {} \; + +if [ "$ARCH" == "x86_64" ]; then + zcat $CWD/Python-2.3.3-dirs.patch.gz | patch -p0 --verbose || exit $ERROR_PATCH # thanks suse + zcat $CWD/Python-2.4c1-multilib.patch.gz | patch -p1 --verbose || exit $ERROR_PATCH # ditto +fi + +OPT="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=$LIBDIR \ + --with-ncurses \ + --with-threads \ + --enable-ipv6 \ + --enable-shared || exit $ERROR_CONF +make -j3 || exit $ERROR_MAKE +make install DESTDIR=$PKG || exit $ERROR_INSTALL + +# Install some python-demo files: +mkdir -p $PKG/usr/doc/python-$VERSION +cp -a Demo $PKG/usr/doc/python-$VERSION + +# We'll install the python-tools under site-packages: +mkdir -p $SITEPK +( cd Tools ; cp -a * $SITEPK ) +mkdir -p $PKG/usr/doc/python-$VERSION +mv $SITEPK/README $PKG/usr/doc/python-$VERSION/README.python-tools +( cd $PKG/usr/doc/python-$VERSION + ln -sf $TOOLSDIR Tools +) +# Make a few useful symlinks: +mkdir -p $PKG/usr/bin +( cd $PKG/usr/bin + ln -sf /usr/lib/python2.4/site-packages/modulator/modulator.py modulator + ln -sf /usr/lib/python2.4/site-packages/pynche/pynche pynche + ln -sf /usr/lib/python2.4/site-packages/i18n/msgfmt.py . + ln -sf /usr/lib/python2.4/site-packages/i18n/pygettext.py . +) + +# Install docs: +mkdir -p $PKG/usr/doc/python-$VERSION +cp -a README $PKG/usr/doc/python-$VERSION +cp -a Misc $PKG/usr/doc/python-$VERSION +( cd $PKG/usr/doc/python-$VERSION ; mkdir html ) +( cd $PKG/usr/doc/python-$VERSION/html + tar xjvf $CWD/html-$VERSION.tar.bz2 + chown -R root:root . +) +( cd $PKG/usr/bin + rm -f python + ln -sf python2.4 python +) +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) +gzip -9 $PKG/usr/man/man1/*.? +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +makepkg -l y -c n $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi + diff --git a/patches/python/slack-desc b/patches/python/slack-desc new file mode 100644 index 00000000..569c3c5b --- /dev/null +++ b/patches/python/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +python: python (object-oriented interpreted programming language) +python: +python: Python is an interpreted, interactive, object-oriented programming +python: language that combines remarkable power with very clear syntax. +python: Python's basic power can be extended with your own modules written in +python: C or C++. Python is also adaptable as an extension language for +python: existing applications. +python: +python: +python: +python: |