1 |
Steve Dibb wrote: |
2 |
> Okay, this is my first attempt at writing an eclass, so comments are |
3 |
> welcome. |
4 |
|
5 |
Okay, haven't heard anything back on this, everyone I've talked to |
6 |
personally seems to think it's good to go. I've been busy with work |
7 |
which is why I haven't pursued it further, but I'll be committing this |
8 |
to the tree soon unless there's any technical objections. |
9 |
|
10 |
Thanks guys. |
11 |
|
12 |
Steve |
13 |
|
14 |
> First of all, here's the background. Sword modules are currently lumped |
15 |
> together in one general package (sword-modules), when it would be |
16 |
> simpler and easier to track them by having them as individual packages, |
17 |
> each in app-dict, with a package naming scheme of "sword-ModName" |
18 |
> format. ModName is the naming scheme used upstream to release modules |
19 |
> as, so creating ebuilds is going to be in the official releases a matter |
20 |
> of just inheriting the eclass and setting the SWORD_MODULE variable. The |
21 |
> eclass takes care of the rest, which is just unpacking the files and |
22 |
> dropping them in /usr/share/sword |
23 |
> |
24 |
> Since upstream[1] doesn't have any proper versioning scheme (all |
25 |
> releases are ModName.zip, regardless of version), I'm going to manually |
26 |
> host a mirror on spaceparanoids[2] of the module with the version |
27 |
> suffixed on the filename. Alternatively, I could just put them in |
28 |
> distfiles-local. With the eclass, we can have ebuilds for each version |
29 |
> release. |
30 |
> |
31 |
> Let me know what you guys thinks. Thanks. |
32 |
> |
33 |
> Here's the eclass: |
34 |
> |
35 |
> # Copyright 1999-2008 Gentoo Foundation |
36 |
> # Distributed under the terms of the GNU General Public License v2 |
37 |
> # $Header: $ |
38 |
> |
39 |
> # |
40 |
> # eclass to simplify installation of Sword modules |
41 |
> # Bugs to theology@g.o |
42 |
> # |
43 |
> |
44 |
> HOMEPAGE="http://www.crosswire.org/sword/modules/" |
45 |
> SRC_URI="http://spaceparanoids.org/downloads/sword/${SWORD_MODULE}-${PV}.zip" |
46 |
> |
47 |
> |
48 |
> SLOT="0" |
49 |
> IUSE="" |
50 |
> |
51 |
> S="${WORKDIR}" |
52 |
> |
53 |
> RDEPEND="app-text/sword" |
54 |
> DEPEND="app-arch/unzip" |
55 |
> |
56 |
> sword-module_src_install() { |
57 |
> insinto /usr/share/sword/modules |
58 |
> doins -r "${S}"/modules/* |
59 |
> insinto /usr/share/sword/mods.d |
60 |
> doins "${S}"/mods.d/* |
61 |
> } |
62 |
> |
63 |
> EXPORT_FUNCTIONS src_install |
64 |
> |
65 |
> |
66 |
> |
67 |
> And also a sample ebuild that inherits it, this would be |
68 |
> app-dicts/sword-WebstersDict-1.1.ebuild: |
69 |
> |
70 |
> |
71 |
> |
72 |
> # Copyright 1999-2008 Gentoo Foundation |
73 |
> # Distributed under the terms of the GNU General Public License v2 |
74 |
> # $Header: $ |
75 |
> |
76 |
> SWORD_MODULE="WebstersDict" |
77 |
> |
78 |
> inherit sword-module |
79 |
> |
80 |
> DESCRIPTION="Webster's Revised Unabridged Dictionary of the English |
81 |
> Language 1913" |
82 |
> HOMEPAGE="http://crosswire.org/sword/modules/ModInfo.jsp?modName=WebstersDict" |
83 |
> |
84 |
> LICENSE="public-domain" |
85 |
> KEYWORDS="~amd64" |
86 |
> |
87 |
> |
88 |
> 1. http://crosswire.org/sword/modules/index.jsp |
89 |
> |
90 |
> 2. http://spaceparanoids.org/downloads/sword/ |
91 |
|
92 |
-- |
93 |
gentoo-dev@l.g.o mailing list |