diff options
author | Alastair Tse <liquidx@gentoo.org> | 2003-06-04 13:13:59 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2003-06-04 13:13:59 +0000 |
commit | baeb61a8e652351f43ac623ad8809708f720e577 (patch) | |
tree | e2f8d8344fc0ff0972211df720d5fcfba567bd31 /eclass | |
parent | Bump (diff) | |
download | gentoo-2-baeb61a8e652351f43ac623ad8809708f720e577.tar.gz gentoo-2-baeb61a8e652351f43ac623ad8809708f720e577.tar.bz2 gentoo-2-baeb61a8e652351f43ac623ad8809708f720e577.zip |
helper eclass for stardict dictionaries. look how simple they are now :)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/stardict.eclass | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/eclass/stardict.eclass b/eclass/stardict.eclass new file mode 100644 index 000000000000..7071fb446758 --- /dev/null +++ b/eclass/stardict.eclass @@ -0,0 +1,51 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/stardict.eclass,v 1.1 2003/06/04 13:13:59 liquidx Exp $ + +# Author : Alastair Tse <liquidx@gentoo.org> +# +# Convienence class to do stardict dictionary installations. +# +# Usage: +# - Variables to set : +# * FROM_LANG - From this language +# * TO_LANG - To this language +# * DICT_PREFIX - SRC_URI prefix, like "dictd_www.mova.org_" +# * DICT_SUFFIX - SRC_URI after the prefix. + +ECLASS="stardict" +INHERITED="$INHERITED $ECLASS" + +RESTRICT="nostrip nosharedlib" + +[ -z "${DICT_SUFFIX}" ] && DICT_SUFFIX=${PN#stardict-[a-z]*-} +[ -z "${DICT_P}" ] && DICT_P=stardict-${DICT_PREFIX}${DICT_SUFFIX}-${PV} + +if [ -n "${FROM_LANG}" -a -n "${TO_LANG}" ]; then + DESCRIPTION="Stardict Dictionary ${FROM_LANG} to ${TO_LANG}" +elif [ -z "${DESCRIPTION}" ]; then + DESCRIPTION="Another Stardict Dictionary" +fi + +HOMEPAGE="http://stardict.sourceforge.net/ ${HOMEPAGE}" +SRC_URI="mirror://sourceforge/stardict/${DICT_P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86" + +DEPEND=">=app-dicts/stardict-2.1" + +S=${WORKDIR}/${DICT_P} + +stardict_src_compile() { + return +} + +stardict_src_install() { + insinto /usr/share/stardict/dic + doins *.dict.dz + doins *.idx.gz +} + +EXPORT_FUNCTIONS src_compile src_install |