| 1 |
nirbheek |
1.1 |
# Copyright 1999-2010 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
nirbheek |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/eclass/clutter.eclass,v 1.1 2010/02/26 21:15:55 nirbheek Exp $
|
| 4 |
nirbheek |
1.1 |
|
| 5 |
|
|
#
|
| 6 |
|
|
# @ECLASS: clutter.eclass
|
| 7 |
|
|
# @MAINTAINER: GNOME Herd <gnome@gentoo.org>
|
| 8 |
|
|
#
|
| 9 |
|
|
# @BLURB: Sets SRC_URI, LICENSE, etc and exports src_install
|
| 10 |
|
|
#
|
| 11 |
|
|
# Authors:
|
| 12 |
|
|
# Nirbheek Chauhan <nirbheek@gentoo.org>
|
| 13 |
|
|
#
|
| 14 |
|
|
|
| 15 |
|
|
inherit versionator
|
| 16 |
|
|
|
| 17 |
|
|
HOMEPAGE="http://www.clutter-project.org/"
|
| 18 |
|
|
|
| 19 |
|
|
RV=($(get_version_components))
|
| 20 |
|
|
SRC_URI="http://www.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.bz2"
|
| 21 |
|
|
|
| 22 |
nirbheek |
1.2 |
# All official clutter packages use LGPL-2.1
|
| 23 |
|
|
LICENSE="${LICENSE:-LGPL-2.1}"
|
| 24 |
nirbheek |
1.1 |
|
| 25 |
|
|
# This will be used by all clutter packages
|
| 26 |
|
|
DEPEND="dev-util/pkgconfig"
|
| 27 |
|
|
|
| 28 |
|
|
# @ECLASS-VARIABLE: DOCS
|
| 29 |
|
|
# @DESCRIPTION:
|
| 30 |
|
|
# This variable holds relative paths of files to be dodoc-ed.
|
| 31 |
|
|
# By default, it contains the standard list of autotools doc files
|
| 32 |
|
|
DOCS="${DOCS:-AUTHORS ChangeLog NEWS README TODO}"
|
| 33 |
|
|
|
| 34 |
|
|
# @ECLASS-VARIABLE: EXAMPLES
|
| 35 |
|
|
# @DESCRIPTION:
|
| 36 |
|
|
# This variable holds relative paths of files to be added as examples when the
|
| 37 |
|
|
# "examples" USE-flag exists, and is switched on. Bash expressions can be used
|
| 38 |
|
|
# since the variable is eval-ed before substitution. Empty by default.
|
| 39 |
|
|
EXAMPLES="${EXAMPLES:-""}"
|
| 40 |
|
|
|
| 41 |
|
|
# @FUNCTION: clutter_src_install
|
| 42 |
|
|
# @USAGE:
|
| 43 |
|
|
# @DESCRIPTION: Runs emake install, dodoc, and installs examples
|
| 44 |
|
|
clutter_src_install() {
|
| 45 |
|
|
emake DESTDIR="${D}" install || die "emake install failed"
|
| 46 |
|
|
dodoc ${DOCS} || die "dodoc failed"
|
| 47 |
|
|
|
| 48 |
|
|
# examples
|
| 49 |
|
|
if hasq examples ${IUSE} && use examples; then
|
| 50 |
|
|
insinto /usr/share/doc/${PF}/examples
|
| 51 |
|
|
|
| 52 |
|
|
# We use eval to be able to use globs and other bash expressions
|
| 53 |
|
|
for example in $(eval echo ${EXAMPLES}); do
|
| 54 |
|
|
# If directory
|
| 55 |
|
|
if [[ ${example: -1} == "/" ]]; then
|
| 56 |
|
|
doins -r ${example} || die "doins ${example} failed!"
|
| 57 |
|
|
else
|
| 58 |
|
|
doins ${example} || die "doins ${example} failed!"
|
| 59 |
|
|
fi
|
| 60 |
|
|
done
|
| 61 |
|
|
fi
|
| 62 |
|
|
}
|
| 63 |
|
|
|
| 64 |
|
|
EXPORT_FUNCTIONS src_install
|