summaryrefslogtreecommitdiff
blob: 7723df9bcf378bbf2e28d402d1d278d9cb4eeb68 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/sword-modules/sword-modules-20041209.ebuild,v 1.1 2004/12/09 20:01:05 squinky86 Exp $

CROSSWIREFTP="http://www.crosswire.org/ftpmirror/pub/sword/packages/rawzip"
DESCRIPTION="a collection of modules for the sword project"
HOMEPAGE="http://www.crosswire.org/sword/"
SRC_URI="${CROSSWIREFTP}/KJV.zip
	${CROSSWIREFTP}/StrongsGreek.zip
	${CROSSWIREFTP}/StrongsHebrew.zip
	${CROSSWIREFTP}/ASV.zip
	${CROSSWIREFTP}/AKJV.zip
	${CROSSWIREFTP}/ISBE.zip
	${CROSSWIREFTP}/ISV.zip
	${CROSSWIREFTP}/WebstersDict.zip
	${CROSSWIREFTP}/KJVD.zip
	${CROSSWIREFTP}/SME.zip
	${CROSSWIREFTP}/Robinson.zip
	${CROSSWIREFTP}/WEB.zip
	${CROSSWIREFTP}/Packard.zip
	${CROSSWIREFTP}/Vulgate.zip
	${CROSSWIREFTP}/Josephus.zip
	${CROSSWIREFTP}/Jubilee2000.zip
	${CROSSWIREFTP}/MHC.zip
	offensive? (mirror://gentoo/BoM.zip
		mirror://gentoo/Jasher.zip
		mirror://gentoo/Quran.zip)
	intl? (${CROSSWIREFTP}/GerElb.zip
		${CROSSWIREFTP}/GerElb1871.zip
		${CROSSWIREFTP}/GerLut.zip
		${CROSSWIREFTP}/GerLut1545.zip
		${CROSSWIREFTP}/GerSch.zip
		${CROSSWIREFTP}/SpaRV.zip
		${CROSSWIREFTP}/FreLSG.zip
		${CROSSWIREFTP}/ItaRive.zip)"
# must wait for the betamodules to return.
#	http://www.crosswire.org/ftpmirror/pub/sword/betamodules/win/QuranShakir.zip

RESTRICT="nomirror"
LICENSE="freedist"
SLOT="0"
KEYWORDS="~x86 ~ppc ~amd64"
IUSE="offensive intl"

S=${WORKDIR}

RDEPEND="app-text/sword"
DEPEND="${RDEPEND}
	app-arch/unzip"

src_unpack() {
	# first, extract the easy ones
	unpack KJV.zip > /dev/null
	unpack StrongsGreek.zip > /dev/null
	unpack StrongsHebrew.zip > /dev/null
	unpack ASV.zip > /dev/null
	unpack AKJV.zip > /dev/null
	unpack ISBE.zip > /dev/null
	unpack ISV.zip > /dev/null
	unpack WebstersDict.zip > /dev/null
	unpack KJVD.zip > /dev/null
	unpack SME.zip > /dev/null
	unpack Robinson.zip > /dev/null
	unpack WEB.zip > /dev/null
	unpack Packard.zip > /dev/null
	unpack Vulgate.zip > /dev/null
	unpack Josephus.zip > /dev/null
	unpack Jubilee2000.zip > /dev/null
	unpack MHC.zip > /dev/null

	if use intl; then
		unpack GerElb.zip > /dev/null
		unpack GerElb1871.zip > /dev/null
		unpack GerLut.zip > /dev/null
		unpack GerLut1545.zip > /dev/null
		unpack GerSch.zip > /dev/null
		unpack SpaRV.zip > /dev/null
		unpack FreLSG.zip > /dev/null
		unpack ItaRive > /dev/null
	fi

	if use offensive; then
		unpack BoM.zip > /dev/null
		unpack Jasher.zip > /dev/null
		# uh oh, the quran is only availabe for windows; extract the data
		unpack Quran.zip > /dev/null
		unzip ${S}/data.zip > /dev/null
#		unpack QuranShakir.zip > /dev/null
#		unzip ${S}/data.zip > /dev/null
	fi
}

src_compile() {
	einfo "Nothing to compile."
}

src_install () {
	dodir /usr/share/sword/modules || die
	cp -a ${S}/modules/* ${D}/usr/share/sword/modules/ || die
	dodir /usr/share/sword/mods.d || die
	cp ${S}/mods.d/* ${D}/usr/share/sword/mods.d/ || die

	# there are windows-only modules in the offensive flag that put
	# config files into /newmods instead of /mods.d
	if use offensive; then
		cp ${S}/newmods/* ${D}/usr/share/sword/mods.d/ || die
	fi
}

pkg_postinst() {
	echo
	einfo "You should now have modules for The SWORD Project."
	einfo "You can download more modules from the SWORD homepage:"
	einfo "  http://www.crosswire.org/sword/"
	if ! use offensive; then
		echo
		einfo "You do not have the offensive USE flag enabled."
		einfo "Questionable texts were not installed. To install them,"
		einfo "USE=\"offensive\" emerge ${PN}"
	fi
	if ! use intl; then
		echo
		einfo "To enable different languages of selected texts contained"
		einfo "in this ebuild,"
		einfo "USE=\"intl\" emerge ${PN}"
	fi
}