| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.1 2011/08/22 18:19:35 maksbotan Exp $
|
| 4 |
#
|
| 5 |
# @ECLASS: leechcraft.eclass
|
| 6 |
# @MAINTAINER:
|
| 7 |
# leechcraft@gentoo.org
|
| 8 |
# @BLURB: Common functions and setup utilities for the LeechCraft app
|
| 9 |
# @AUTHOR:
|
| 10 |
# 0xd34df00d@gmail.com
|
| 11 |
# NightNord@niifaq.ru
|
| 12 |
# @DESCRIPTION:
|
| 13 |
# The leechcraft eclass contains a common set of functions and steps
|
| 14 |
# needed to build LeechCraft core or its plugins.
|
| 15 |
#
|
| 16 |
# Though this eclass seems to be small at the moment, it seems like a
|
| 17 |
# good idea to make all plugins inherit from it, since all plugins
|
| 18 |
# have mostly the same configuring/build process.
|
| 19 |
#
|
| 20 |
# Thanks for original eclass to Andrian Nord <NightNord@niifaq.ru>.
|
| 21 |
#
|
| 22 |
# Only EAPI >1 supported
|
| 23 |
|
| 24 |
case ${EAPI:-0} in
|
| 25 |
4|3|2) ;;
|
| 26 |
0|1) die "EAPI not supported, bug ebuild mantainer" ;;
|
| 27 |
*) die "Unknown EAPI, bug eclass maintainers" ;;
|
| 28 |
esac
|
| 29 |
|
| 30 |
inherit cmake-utils
|
| 31 |
|
| 32 |
if [[ ${PV} == 9999 ]]; then
|
| 33 |
EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git"
|
| 34 |
EGIT_PROJECT="leechcraft"
|
| 35 |
|
| 36 |
inherit git-2
|
| 37 |
else
|
| 38 |
SRC_URI="mirror://sourceforge/leechcraft/leechcraft-${PV}.tar.bz2"
|
| 39 |
S="${WORKDIR}/leechcraft-${PV}"
|
| 40 |
fi
|
| 41 |
|
| 42 |
HOMEPAGE="http://leechcraft.org/"
|
| 43 |
LICENSE="GPL-3"
|
| 44 |
|
| 45 |
# @ECLASS-VARIABLE: LEECHCRAFT_PLUGIN_CATEGORY
|
| 46 |
# @DEFAULT_UNSET
|
| 47 |
# @DESCRIPTION:
|
| 48 |
# Set this to the category of the plugin, if any.
|
| 49 |
: ${LEECHCRAFT_PLUGIN_CATEGORY:=}
|
| 50 |
|
| 51 |
if [[ "${LEECHCRAFT_PLUGIN_CATEGORY}" ]]; then
|
| 52 |
CMAKE_USE_DIR="${S}"/src/plugins/${LEECHCRAFT_PLUGIN_CATEGORY}/${PN#leechcraft-}
|
| 53 |
elif [[ ${PN} != leechcraft-core ]]; then
|
| 54 |
CMAKE_USE_DIR="${S}"/src/plugins/${PN#leechcraft-}
|
| 55 |
else
|
| 56 |
CMAKE_USE_DIR="${S}"/src
|
| 57 |
fi
|