summaryrefslogtreecommitdiff
path: root/dev-java/gradle-bin/gradle-bin-8.10.2.ebuild
blob: 92e4a58d6fc2859d0033f6a795f9968238b30202 (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
58
59
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

JAVA_PKG_IUSE="doc source"

inherit java-pkg-2

MY_PN=${PN%%-bin}
MY_P="${MY_PN}-${PV/_rc/-rc-}"

DESCRIPTION="A project automation and build tool with a Groovy based DSL"
HOMEPAGE="https://gradle.org"
SRC_URI="https://services.gradle.org/distributions/${MY_P}-all.zip -> ${P}.zip"

S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0"
SLOT="${PV}"
KEYWORDS="amd64"

DEPEND="app-eselect/eselect-gradle"
BDEPEND="app-arch/unzip"
RDEPEND="
	${DEPEND}
	>=virtual/jre-1.8:*
"

src_compile() {
	:
}

src_install() {
	local gradle_dir="/usr/share/${PN}-${SLOT}"

	if use source; then
		java-pkg_dosrc src
	fi

	docinto html
	dodoc -r docs/release-notes.html
	if use doc; then
		dodoc -r docs/{dsl,userguide}
		java-pkg_dojavadoc docs/javadoc
	fi

	insinto "${gradle_dir}"
	doins -r bin/ lib/
	fperms 755 "${gradle_dir}/bin/gradle"
	dosym "${gradle_dir}/bin/gradle" "/usr/bin/${PN}-${SLOT}"
}

pkg_postinst() {
	eselect gradle update ifunset
}

pkg_postrm() {
	eselect gradle update ifunset
}