summaryrefslogtreecommitdiff
blob: 2ccebd68ffa93e14c1f02f276452fe319cac86dc (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="GenealogyJ is a viewer and editor for genealogic data and is written in Java"
HOMEPAGE="http://genj.sf.net/"
SRC_URI="mirror://sourceforge/genj/genj_app-${PV}.zip
	skins? ( mirror://sourceforge/genj/genj_lnf-2.0.zip )
	geoview? ( mirror://sourceforge/genj/genj_geo-${PV}.zip )"

S=${WORKDIR}
PROGRAM_DIR=/opt/${PN}
LANGS="de en es fr hu nl pl pt_BR"

LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~x86"
IUSE="geoview skins"
for X in ${LANGS} ; do
    SRC_URI="${SRC_URI} linguas_${X}? ( mirror://sourceforge/genj/genj_${X}-${PV}.zip )"
    IUSE="${IUSE} linguas_${X}"
done

if [ -z "${LINGUAS}" ]; then
    SRC_URI="${SRC_URI} linguas_en? ( mirror://sourceforge/genj/genj_en-${PV}.zip )"
    IUSE="${IUSE} linguas_en"
fi


DEPEND=">=virtual/jre-1.4
    app-arch/unzip"
RDEPEND="${DEPEND}"

pkg_setup() {
	if [ -z "${LINGUAS}" ]; then
		ewarn " To install a localized version, set the according LINGUAS variable(s). Default: en "
		ewarn " Supported localizations: de en es fr hu* nl* pt_BR* pl*"
		ewarn " (* = Help file in English only. Upstream doesn't have a translation.) "
	fi
}

src_compile() {
	einfo "Binary only installation, no compilation needed."
}

src_install() {
	insinto ${PROGRAM_DIR}
	exeinto ${PROGRAM_DIR}

	doins *.jar
	doins run.sh
	# Necessary to be able to run it as a user:
	fperms 777 ${PROGRAM_DIR}/run.sh

	insinto ${PROGRAM_DIR}/lib/

	doins lib/*

	insinto ${PROGRAM_DIR}/gedcom/
	doins gedcom/*

	insinto ${PROGRAM_DIR}/report/
	doins report/*
	
	insinto ${PROGRAM_DIR}/doc/
	doins doc/*

	dobin ${FILESDIR}/genealogyj
	use skins && cp -R lnf/ ${D}/${PROGRAM_DIR}/

	cp -R report/ ${D}/${PROGRAM_DIR}/
	cp -R help/ ${D}/${PROGRAM_DIR}/
	cp -R contrib/ ${D}/${PROGRAM_DIR}/
}
pkg_postinst() {
	einfo
	einfo "This ebuild does not install the GenealogyJ web applet"
	einfo
}