1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Evgeniy Alekseev <arcanis at archlinux dot org>
4 # Contributor: Tomasz Żok <tomasz dot zok at gmail dot com>
7 _project=pymol-open-source
10 pkgdesc='Molecular visualization system on an Open Source foundation'
22 makedepends=(desktop-file-utils
26 python-{build,installer,wheel}
28 optdepends=('python-pyqt5: Qt5 based UI')
29 _archive="$_project-$pkgver"
30 source=("https://github.com/schrodinger/pymol-open-source/archive/v$pkgver/$_archive.tar.gz"
31 "$pkgname.png::https://c.fsdn.com/allura/p/pymol/icon")
32 sha256sums=('aa828bf5719bd9a14510118a93182a6e0cadc03a574ba1e327e1e9780a0e80b3'
33 '0ea81faaf336becc669a193777d0dca55475d303d1236b57df25cf67ff7c2bcd')
39 --pkgname "$pkgname" \
40 --name="PyMOL Molecular Graphics System" \
41 --pkgdesc "$pkgdesc" \
42 --exec="$pkgname %F" \
43 --mimetypes="chemical/x-pdb;chemical/pdby;chemical/x-mol2;chemical/x-mdl-molfile;chemical/x-mdl-sdfile;chemical/x-xyz;chemical/x-macromodel-input;chemical/x-vmd" \
44 --categories="Science;Chemistry"
46 # suppress non-zero exit code that breaks makepkg
47 sed -i -e '/sys.exit/ s,2,0,' setup.py
48 # setup script PEP 517 compatiblitiy is broken
49 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
50 sed -i -E '/def (finalize_options|make_launch_script)/a \ self.install_libbase="'$site_packages'"' setup.py
59 install -Dm0644 -t "$pkgdir/usr/share/applications/" "$pkgname.desktop"
60 install -Dm0644 -t "$pkgdir/usr/share/pixmaps/" "$pkgname.png"
62 python -m installer -d "$pkgdir" dist/*.whl
63 install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE