aboutsummaryrefslogtreecommitdiff
blob: c51cd18726642d953e022f4d5ce041c62432ed7d (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit python-single-r1 toolchain-funcs

DESCRIPTION="Graphical tool to construct chemical compound definitions for NMR"
HOMEPAGE="http://www.ccpn.ac.uk/software/chembuild"
SRC_URI="http://www2.ccpn.ac.uk/download/ccpnmr/${PN}${PV}_WithApi.tar.gz"

SLOT="0"
LICENSE="|| ( CCPN LGPL-2.1 )"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="dev-python/pyside[webkit,${PYTHON_USEDEP}]"
DEPEND=""

S="${WORKDIR}"/ccpnmr/ccpnmr3.0/

#TODO:
#install in sane place
#unbundle data model
#unbundle inchi
#parallel build

src_install() {
	local in_path=$(python_get_sitedir)/${PN}
	local _file

	find . -name "*.pyc" -type f -delete
	dodir /usr/bin
	sed \
	-e "s|gentoo_sitedir|${EPREFIX}$(python_get_sitedir)|g" \
	-e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
	-e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
	-e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
	-e "s|gentoopython|${PYTHON}|g" \
	-e "s|gentoousr|${EPREFIX}/usr|g" \
	-e "s|//|/|g" \
		"${FILESDIR}"/${PN} > "${ED}"/usr/bin/${PN} || die
	fperms 755 /usr/bin/${PN}

	rm -rf cNg license || die

	ebegin "Installing main files"
	python_moduleinto ${PN}
	python_domodule *
	python_optimize
	eend
}