summaryrefslogtreecommitdiff
path: root/community/pymol/PKGBUILD
blob: aa1d7a270095681e10019dfa63336803e32d4ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 103273 2014-01-02 00:34:19Z arcanis $
# Maintainer: Evgeniy Alekseev <arcanis dot arch at gmail dot com>
# Contributor: graysky
# Contributor: Tomasz Żok <tomasz dot zok at gmail dot com>

pkgname=pymol
pkgver=1.6.0.0
pkgrel=3
pkgdesc="A USER-SPONSORED molecular visualization system on an OPEN-SOURCE foundation"
arch=('i686' 'x86_64')
url="http://pymol.org/"
license=('custom')
depends=('glut' 'glew' 'mesa' 'python-pmw' 'tcl' 'tcsh' 'tk')
source=("http://downloads.sourceforge.net/project/pymol/pymol/1.6/pymol-v${pkgver}.tar.bz2")
md5sums=('6f5db5beea7497f5a414c8e0cf1ae53d')

prepare() {
  # suppress non-zero exit code that breaks makepkg
  sed -i '/sys.exit/ s,2,0,' "${srcdir}/pymol/setup.py"
  # change python to python2
  sed -i "s|python|python2|g" "${srcdir}/pymol/test/cyg"
  sed -i "s|python|python2|g" "${srcdir}/pymol/test/run"
  sed -i "s|python|python2|g" "${srcdir}/pymol/test/show"
  sed -i "s|python|python2|g" "${srcdir}/pymol/modules/pmg_tk/startup/apbs_tools.py"
}

build() {
  cd "${srcdir}/${pkgname}"
  python2 setup.py build
}

package() {
  cd "${srcdir}/${pkgname}"
  python2 setup.py install --prefix="usr/" --root="${pkgdir}"
  sed -i "s|${pkgdir}||g" pymol
  install -D -m755 "pymol" "${pkgdir}/usr/bin/pymol"
  install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et: