summaryrefslogtreecommitdiff
path: root/gui-apps/openrefine/openrefine-3.10.1.ebuild
blob: 2c66bd97f12f445aafaaa9f6c917ff290697e7f3 (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit wrapper

DESCRIPTION="Wikidata batch editor, Wikimedia Commons mass upload tool"
HOMEPAGE="https://openrefine.org"
SRC_URI="https://github.com/OpenRefine/OpenRefine/releases/download/${PV}/${PN}-linux-${PV}.tar.gz
	commons? ( https://github.com/OpenRefine/CommonsExtension/releases/download/v0.1.1/openrefine-commons-0.1.1.zip )"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

IUSE="+commons"

DEPEND="
	virtual/jre
	dev-java/maven-bin
	net-libs/nodejs
"
BDEPEND="commons? ( app-arch/unzip )"

src_install() {
	local apphome="/opt/${PN}"

	mkdir -p  "${ED}/${apphome}" tools build || die
	chmod 775 tools build || die
	keepdir ${apphome}/{tools,build}

	if use commons ; then
		cp -r "${WORKDIR}/${NANE}/commons-extension" webapp/extensions || die
	fi

	cp -r . "${ED}/${apphome}" || die

	make_wrapper refine "
		env REFINE_LIB_DIR=${apphome}/server/target/lib \
			REFINE_TOOLS_DIR=${apphome}/tools \
			REFINE_CLASSES_DIR=${apphome}/server/classes \
			REFINE_WEBAPP=${apphome}/main/webapp /opt/openrefine/refine"
}

pkg_postinst() {
	elog "In order to use ${PN} run refine in a terminal, from Dmenu also works"
	elog "First run better in terminal - for long installing"
}