summaryrefslogtreecommitdiffstats
path: root/python2/Pkgfile
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2012-01-08 12:12:28 +0100
committertnut <tnut at nutyx dot com>2012-01-08 12:12:28 +0100
commit9291e062cb24bac5d7c7059d4dc64669c1917b33 (patch)
treeae6f7e4fb2769d6c53b214c5e0b4d862f1df98dc /python2/Pkgfile
parentc9972ec7f32bf9d37388e853fe9bf633e242d05a (diff)
downloadnutyx-pakxe-9291e062cb24bac5d7c7059d4dc64669c1917b33.tar.gz
nutyx-pakxe-9291e062cb24bac5d7c7059d4dc64669c1917b33.tar.bz2
nutyx-pakxe-9291e062cb24bac5d7c7059d4dc64669c1917b33.tar.xz
nutyx-pakxe-9291e062cb24bac5d7c7059d4dc64669c1917b33.zip
aaabasicfs 2011-3 et split des dépot base et extra en 2 git séparé
Diffstat (limited to 'python2/Pkgfile')
-rwxr-xr-xpython2/Pkgfile67
1 files changed, 67 insertions, 0 deletions
diff --git a/python2/Pkgfile b/python2/Pkgfile
new file mode 100755
index 000000000..a292bea61
--- /dev/null
+++ b/python2/Pkgfile
@@ -0,0 +1,67 @@
+# Description: Environnement de développement python
+# URL: http://www.python.org
+# Maintainer: NuTyX core team
+# Packager: thierryn1 at hispeed dot ch
+# Depends on:tk,expat
+
+name=python2
+version=2.7.2
+release=1
+_pybasever=2.7
+
+source=( http://www.python.org/ftp/python/$version/Python-$version.tar.bz2
+ python-2.7-db51.diff)
+
+build() {
+ cd Python-$version
+
+ sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
+
+# patch -Np1 -i ../python-2.7-db51.diff
+
+ sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
+ sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py
+
+ rm -r Modules/expat
+ rm -r Modules/zlib
+ rm -r Modules/_ctypes/{darwin,libffi}*
+
+
+ export OPT="${CFLAGS}"
+ ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \
+ --enable-unicode=ucs4 --with-system-expat --with-system-ffi
+
+ make
+ make DESTDIR=$PKG altinstall maninstall
+
+ ln -sf python${_pybasever} $PKG/usr/bin/python2
+ ln -sf python${_pybasever}-config $PKG/usr/bin/python2-config
+ ln -sf python${_pybasever}.1 $PKG/usr/share/man/man1/python2.1
+
+ ln -sf ../../libpython${_pybasever}.so \
+ $PKG/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so
+
+
+
+ mv $PKG/usr/bin/smtpd.py $PKG/usr/lib/python${_pybasever}/
+
+ # some useful "stuff"
+ install -dm755 $PKG/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py \
+ $PKG/usr/lib/python${_pybasever}/Tools/i18n/
+ install -m755 Tools/scripts/{README,*py} \
+ $PKG/usr/lib/python${_pybasever}/Tools/scripts/
+
+ # fix conflicts with python
+ mv $PKG/usr/bin/idle{,2}
+ mv $PKG/usr/bin/pydoc{,2}
+
+ # clean up #!s
+ find $PKG/usr/lib/python2.7/ -name '*.py' | \
+ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ # clean-up reference to build directory
+ sed -i "s#$SRC/Python-$version:##" \
+ $PKG/usr/lib/python${_pybasever}/config/Makefile
+}
+