3231f0b251b3a741820f611aba0ddf7b436be49b
[gentoo.git] / sys-cluster / c3 / c3-4.0.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 DESCRIPTION="The Cluster Command and Control (C3) tool suite"
7 HOMEPAGE="http://www.csm.ornl.gov/torc/C3/"
8 SRC_URI="http://www.csm.ornl.gov/torc/C3/Software/${PV}/${P}.tar.gz"
9
10 LICENSE="C3"
11 SLOT="0"
12 KEYWORDS="~amd64 ~x86"
13 IUSE=""
14
15 # Everything it needs is in "system" (profiles/base/packages)
16 DEPEND=""
17
18 src_compile() {
19         :
20 }
21
22 src_install() {
23         # The Install-c3 script is a complete hack, so we do this ourselves.
24         # CHANGELOG says it's FHS-compliant to put stuff here, so we'll believe it.
25         local C3DIR="/opt/c3-4"
26         dodir ${C3DIR}
27
28         # "libraries"
29         insinto ${C3DIR}
30         doins *.py
31
32         # tools
33         exeinto ${C3DIR}
34         # Everything's in the same dir, so we need to weed out non-tool things
35         local TOOL
36         for TOOL in $(find . -maxdepth 1 -type f -name 'c*' -not -name '*.*'); do
37                 doexe ${TOOL}
38         done
39         # Get systemimager-using tool out of bin, since systemimager isn't in
40         # portage
41         dodoc ${D}/${C3DIR}/cpushimage
42         rm ${D}/${C3DIR}/cpushimage || die
43
44         dodoc README README.scale CHANGELOG KNOWN_BUGS
45         docinto contrib
46         dodoc contrib/*
47
48         doman man/man*/*
49
50         newenvd - 40${PN} <<-EOF
51                 PATH=${C3DIR}
52                 ROOTPATH=${C3DIR}
53         EOF
54 }
55
56 pkg_postinst() {
57         einfo "Because systemimager is not in Portage, cpushimage"
58         einfo "has been installed to /usr/share/doc/${P}/."
59 }