diff options
author | Maxim Koltsov <maksbotan@gentoo.org> | 2011-08-22 18:19:35 +0000 |
---|---|---|
committer | Maxim Koltsov <maksbotan@gentoo.org> | 2011-08-22 18:19:35 +0000 |
commit | 07a627190d4f7d6fe41269e8582cc6a4b304c02e (patch) | |
tree | a40adcd55fc9f141b94aa0d3216bc43f645fe855 /eclass/leechcraft.eclass | |
parent | Version bump. (diff) | |
download | gentoo-2-07a627190d4f7d6fe41269e8582cc6a4b304c02e.tar.gz gentoo-2-07a627190d4f7d6fe41269e8582cc6a4b304c02e.tar.bz2 gentoo-2-07a627190d4f7d6fe41269e8582cc6a4b304c02e.zip |
Add leechcraft.eclass, thanks to 0xd34df00d
Diffstat (limited to 'eclass/leechcraft.eclass')
-rw-r--r-- | eclass/leechcraft.eclass | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/eclass/leechcraft.eclass b/eclass/leechcraft.eclass new file mode 100644 index 000000000000..484c70442c69 --- /dev/null +++ b/eclass/leechcraft.eclass @@ -0,0 +1,57 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.1 2011/08/22 18:19:35 maksbotan Exp $ +# +# @ECLASS: leechcraft.eclass +# @MAINTAINER: +# leechcraft +# @BLURB: Common functions and setup utilities for the LeechCraft app +# @AUTHOR: +# 0xd34df00d@gmail.com +# NightNord@niifaq.ru +# @DESCRIPTION: +# The leechcraft eclass contains a common set of functions and steps +# needed to build LeechCraft core or its plugins. +# +# Though this eclass seems to be small at the moment, it seems like a +# good idea to make all plugins inherit from it, since all plugins +# have mostly the same configuring/build process. +# +# Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>. +# +# Only EAPI >1 supported + +case ${EAPI:-0} in + 4|3|2) ;; + 0|1) die "EAPI not supported, bug ebuild mantainer" ;; + *) die "Unknown EAPI, bug eclass maintainers" ;; +esac + +inherit cmake-utils + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git" + EGIT_PROJECT="leechcraft" + + inherit git-2 +else + SRC_URI="mirror://sourceforge/leechcraft/leechcraft-${PV}.tar.bz2" + S="${WORKDIR}/leechcraft-${PV}" +fi + +HOMEPAGE="http://leechcraft.org/" +LICENSE="GPL-3" + +# @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY +# @DEFAULT_UNSET +# @DESCRIPTION: +# Set this to the category of the plugin, if any. +: ${LEECHCRAFT_PLUGIN_CATEGORY:=} + +if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then + CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#leechcraft-} +elif [[ ${PN} != leechcraft-core ]]; then + CMAKE_USE_DIR="${S}"/src/plugins/${PN#leechcraft-} +else + CMAKE_USE_DIR="${S}"/src +fi |