Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

python 2.6.6 pkgbuild

By: a guest on Nov 8th, 2010  |  syntax: Bash  |  size: 2.36 KB  |  views: 259  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=python26
  2. pkgver=2.6.6
  3. pkgrel=1
  4. _pybasever=2.6
  5. pkgdesc="A high-level scripting language"
  6. arch=('i686' 'x86_64')
  7. license=('PSF')
  8. url="http://www.python.org"
  9. depends=('db>=4.8' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3')
  10. makedepends=('tk>=8.5.0')
  11. optdepends=('tk: for IDLE, pynche and modulator')
  12. provides=('python2' 'python-elementtree' 'python-ctypes')
  13. replaces=('python-elementtree' 'python-ctypes')
  14. source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
  15.         python-2.6.6-internal-expat.patch
  16.         python-2.6.6-db-4.8.patch
  17.         modulator-launcher
  18.         pynche-launcher)
  19. md5sums=('cf4e6881bb84a7ce6089e4a307f71f14'
  20.          '639bdb32084a32600585e7cf8c35b557'
  21.          '54351707d8b3084391fc94befd20787f'
  22.          'b4a531570415280dc406c8d5c1fa8d83'
  23.          '9f731b9033db285132a3524fb36409e7')
  24.  
  25. build() {
  26.   cd ${srcdir}/Python-${pkgver}
  27.  
  28.   patch -Np0 -i ${srcdir}/python-2.6.6-internal-expat.patch
  29.  
  30.   #http://bugs.python.org/issue6949
  31.   patch -Np0 -i ${srcdir}/python-2.6.6-db-4.8.patch
  32.  
  33.   export OPT="${CFLAGS}"
  34.   ./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
  35.  
  36.   make || return 1
  37.   make DESTDIR=${pkgdir} altinstall
  38.  
  39.   ln -sf python${_pybasever} ${pkgdir}/usr/bin/python26
  40.  
  41.   ln -sf ../../libpython${_pybasever}.so \
  42.     ${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so
  43.  
  44.   # Install the tools
  45.   #modulator
  46.   sed -i "s#%%PYBASEVER%%#${_pybasever}#" ${srcdir}/modulator-launcher
  47.   install -m755 ${srcdir}/modulator-launcher ${pkgdir}/usr/bin/modulator
  48.   cp -r Tools/modulator ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
  49.  
  50.   #pynche
  51.   sed -i "s#%%PYBASEVER%%#${_pybasever}#" ${srcdir}/pynche-launcher
  52.   install -m755 ${srcdir}/pynche-launcher ${pkgdir}/usr/bin/pynche
  53.   rm -f Tools/pynche/*.pyw
  54.   cp -r Tools/pynche ${pkgdir}/usr/lib/python${_pybasever}/site-packages/
  55.  
  56.   #gettext
  57.   install -dm755 ${pkgdir}/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
  58.   install -m755 Tools/i18n/{msgfmt,pygettext}.py \
  59.     ${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/
  60.   install -m755 Tools/scripts/{README,*py} \
  61.     ${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/
  62.  
  63.   # fix conflicts with python
  64.   mv $pkgdir/usr/bin/2to3{,26}
  65.   mv $pkgdir/usr/bin/idle{,26}
  66.   mv $pkgdir/usr/bin/pydoc{,26}
  67.  
  68.   # license
  69.   install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  70. }