CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
898ac846d7e58d32ced1be8e46b2a428cc24bd5d
[ports/opt-arm.git] / python / Pkgfile
1 # Description: Python interpreter, version 2.7
2 # URL: http://www.python.org
3 # Maintainer: Juergen Daubert, jue at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: db gdbm openssl bzip2 zlib sqlite3
6
7 name=python
8 version=2.7.9
9 release=1
10 source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \
11 pyconfig.h)
12
13 build () {
14 cd Python-$version
15
16 # set OPT to the python default without -O3
17 # our CFLAGS are used as well
18 OPT="-Wall -Wstrict-prototypes -fwrapv" \
19 ./configure --prefix=/usr \
20 --mandir=/usr/man \
21 --enable-shared \
22 --with-threads \
23 --enable-ipv6
24
25 make
26 make -j1 DESTDIR=$PKG install
27
28 # fix issue with man-page symlink
29 ln -sf python2.7.1 $PKG/usr/man/man1/python.1
30
31 ln -sf python2.7 $PKG/usr/bin/python
32 ln -s python2.7 $PKG/usr/lib/python
33 ln -s python2.7 $PKG/usr/include/python
34 ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so
35
36 rm -r $PKG/usr/lib/python/{bsddb,ctypes,email,sqlite3}/test
37 rm -r $PKG/usr/lib/python/{distutils,json,lib2to3}/tests
38 rm $PKG/usr/lib/python/{distutils,site-packages,test/data}/README
39 rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt}
40 rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes
41
42 mv $PKG/usr/include/python2.7/pyconfig{,-32}.h
43 install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/
44 }