blob: 805645ad4229e92cc57a05c335de68033e9e467c (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# $Id: PKGBUILD 111108 2014-05-13 21:33:30Z 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.7.1.3
pkgrel=1
pkgdesc="Molecular visualization system on an Open Source foundation"
arch=('i686' 'x86_64')
url="http://pymol.org/"
license=('custom')
depends=('glew' 'glut' 'mesa' 'python2-numpy' 'python2-pmw' 'tcsh')
makedepends=('desktop-file-utils' 'gendesk')
source=("http://downloads.sourceforge.net/project/pymol/pymol/1.7/pymol-v${pkgver}.tar.bz2"
"${pkgname}-38899.patch"
"apbstools_tcltk8.6.patch")
install="${pkgname}.install"
md5sums=('414e57a76d8e6e58540b743c1c2fb5ee'
'1f8152c4604ba2939b24e25a022937ca'
'c48bf253e59ff97c14114cd285a4f1e1')
prepare() {
# create desktop file
gendesk -f --pkgname "${pkgname}" --pkgdesc "${pkgdesc}" --name="PyMOL" --categories="Science;Chemistry"
# 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"
# fix FS#38899
patch -p0 -i "${pkgname}-38899.patch"
mv "${srcdir}/${pkgname}/modules/web" "${srcdir}/${pkgname}/modules/pymolweb"
# fix FS#39526
cd "${srcdir}/${pkgname}"
#patch -p0 -i "${srcdir}/apbstools_tcltk8.6.patch"
}
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 -Dm755 "pymol" "${pkgdir}/usr/bin/pymol"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${srcdir}/pymol.desktop" "${pkgdir}/usr/share/applications/pymol.desktop"
install -Dm644 "${srcdir}/pymol.png" "${pkgdir}/usr/share/pixmaps/pymol.png"
}
# vim:set ts=2 sw=2 et:
|