summaryrefslogtreecommitdiff
path: root/app-admin/modules/modules-5.6.0.ebuild
blob: af21112c0b757673ac8d2a6f1d19260cfa3ec450 (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
# Copyright 2020-2025 BaldEagleOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8

DESCRIPTION="An environment module system supporting TCL and software hierarchy"
HOMEPAGE="http://modules.sourceforge.net/"
SRC_URI="https://github.com/cea-hpc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 x86"
IUSE="doc test"

DEPEND=">=dev-lang/tcl-8.4.0
		doc? ( >=dev-python/sphinx-1.0.0 )
		test? ( dev-util/dejagnu )"
RDEPEND="${DEPEND}"

LDIR="/etc/Modules"
MDIR="${LDIR}/modules"

src_configure() {
	./configure --prefix=/usr \
				--mandir=/usr/share/man \
				--docdir=/usr/share/doc/${P} \
				--libdir=/usr/lib64 \
				--with-modulepath=${MDIR} \
				--etcdir=${LDIR} \
				--with-initconf-in=etcdir \
				--with-moduleshome=${MDIR}
}

src_install() {
	dodir ${MDIR}
	doins -r "${FILESDIR}/etc"
	default
}

pkg_postinst() {
	elog "You should add the following to your ~/.bashrc to use ${PN}:"
	elog "export MODULEPATH=/usr/modulefiles:${MDIR}"
	elog "[ -f /usr/init/bash ] && \\ "
	elog "    source /usr/init/bash"
	elog ""
	elog "You may also want to run the following commands to update the system cache dir:"
	elog "export MODULEPATH=/usr/modulefiles:${MDIR}"
	elog "source /usr/init/bash"
}