* [gentoo-dev] RFC: new sword-module eclass
@ 2008-01-29 5:38 Steve Dibb
2008-02-19 15:09 ` Steve Dibb
0 siblings, 1 reply; 2+ messages in thread
From: Steve Dibb @ 2008-01-29 5:38 UTC (permalink / raw
To: gentoo-dev
Okay, this is my first attempt at writing an eclass, so comments are
welcome.
First of all, here's the background. Sword modules are currently lumped
together in one general package (sword-modules), when it would be
simpler and easier to track them by having them as individual packages,
each in app-dict, with a package naming scheme of "sword-ModName"
format. ModName is the naming scheme used upstream to release modules
as, so creating ebuilds is going to be in the official releases a matter
of just inheriting the eclass and setting the SWORD_MODULE variable.
The eclass takes care of the rest, which is just unpacking the files and
dropping them in /usr/share/sword
Since upstream[1] doesn't have any proper versioning scheme (all
releases are ModName.zip, regardless of version), I'm going to manually
host a mirror on spaceparanoids[2] of the module with the version
suffixed on the filename. Alternatively, I could just put them in
distfiles-local. With the eclass, we can have ebuilds for each version
release.
Let me know what you guys thinks. Thanks.
Here's the eclass:
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# eclass to simplify installation of Sword modules
# Bugs to theology@gentoo.org
#
HOMEPAGE="http://www.crosswire.org/sword/modules/"
SRC_URI="http://spaceparanoids.org/downloads/sword/${SWORD_MODULE}-${PV}.zip"
SLOT="0"
IUSE=""
S="${WORKDIR}"
RDEPEND="app-text/sword"
DEPEND="app-arch/unzip"
sword-module_src_install() {
insinto /usr/share/sword/modules
doins -r "${S}"/modules/*
insinto /usr/share/sword/mods.d
doins "${S}"/mods.d/*
}
EXPORT_FUNCTIONS src_install
And also a sample ebuild that inherits it, this would be
app-dicts/sword-WebstersDict-1.1.ebuild:
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
SWORD_MODULE="WebstersDict"
inherit sword-module
DESCRIPTION="Webster's Revised Unabridged Dictionary of the English
Language 1913"
HOMEPAGE="http://crosswire.org/sword/modules/ModInfo.jsp?modName=WebstersDict"
LICENSE="public-domain"
KEYWORDS="~amd64"
1. http://crosswire.org/sword/modules/index.jsp
2. http://spaceparanoids.org/downloads/sword/
--
gentoo-dev@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] RFC: new sword-module eclass
2008-01-29 5:38 [gentoo-dev] RFC: new sword-module eclass Steve Dibb
@ 2008-02-19 15:09 ` Steve Dibb
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dibb @ 2008-02-19 15:09 UTC (permalink / raw
To: gentoo-dev
Steve Dibb wrote:
> Okay, this is my first attempt at writing an eclass, so comments are
> welcome.
Okay, haven't heard anything back on this, everyone I've talked to
personally seems to think it's good to go. I've been busy with work
which is why I haven't pursued it further, but I'll be committing this
to the tree soon unless there's any technical objections.
Thanks guys.
Steve
> First of all, here's the background. Sword modules are currently lumped
> together in one general package (sword-modules), when it would be
> simpler and easier to track them by having them as individual packages,
> each in app-dict, with a package naming scheme of "sword-ModName"
> format. ModName is the naming scheme used upstream to release modules
> as, so creating ebuilds is going to be in the official releases a matter
> of just inheriting the eclass and setting the SWORD_MODULE variable. The
> eclass takes care of the rest, which is just unpacking the files and
> dropping them in /usr/share/sword
>
> Since upstream[1] doesn't have any proper versioning scheme (all
> releases are ModName.zip, regardless of version), I'm going to manually
> host a mirror on spaceparanoids[2] of the module with the version
> suffixed on the filename. Alternatively, I could just put them in
> distfiles-local. With the eclass, we can have ebuilds for each version
> release.
>
> Let me know what you guys thinks. Thanks.
>
> Here's the eclass:
>
> # Copyright 1999-2008 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> #
> # eclass to simplify installation of Sword modules
> # Bugs to theology@gentoo.org
> #
>
> HOMEPAGE="http://www.crosswire.org/sword/modules/"
> SRC_URI="http://spaceparanoids.org/downloads/sword/${SWORD_MODULE}-${PV}.zip"
>
>
> SLOT="0"
> IUSE=""
>
> S="${WORKDIR}"
>
> RDEPEND="app-text/sword"
> DEPEND="app-arch/unzip"
>
> sword-module_src_install() {
> insinto /usr/share/sword/modules
> doins -r "${S}"/modules/*
> insinto /usr/share/sword/mods.d
> doins "${S}"/mods.d/*
> }
>
> EXPORT_FUNCTIONS src_install
>
>
>
> And also a sample ebuild that inherits it, this would be
> app-dicts/sword-WebstersDict-1.1.ebuild:
>
>
>
> # Copyright 1999-2008 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> SWORD_MODULE="WebstersDict"
>
> inherit sword-module
>
> DESCRIPTION="Webster's Revised Unabridged Dictionary of the English
> Language 1913"
> HOMEPAGE="http://crosswire.org/sword/modules/ModInfo.jsp?modName=WebstersDict"
>
> LICENSE="public-domain"
> KEYWORDS="~amd64"
>
>
> 1. http://crosswire.org/sword/modules/index.jsp
>
> 2. http://spaceparanoids.org/downloads/sword/
--
gentoo-dev@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-19 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 5:38 [gentoo-dev] RFC: new sword-module eclass Steve Dibb
2008-02-19 15:09 ` Steve Dibb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox