summaryrefslogtreecommitdiff
path: root/eclass/fatrat-plugin.eclass
blob: 951785c45f2c2147a275c2a5585ddc9339e23441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

#
# Original Author: David Watzke <david@watzke.cz>
# Purpose: simplify creating ebuilds for FatRat's plugins
#

EAPI="1"

if [[ "${PV}" == "9999" ]]; then
	inherit git
	EGIT_REPO_URI="git://git.dolezel.info/${PN}.git"
	SRC_URI=""
	DEPEND="|| ( ~net-misc/fatrat-9999 ~net-misc/fatrat-1.1.9999 )"
else
	SRC_URI="http://www.dolezel.info/download/data/${PN}/${P}.tar.gz"
	DEPEND="~net-misc/fatrat-${PV}"
fi

HOMEPAGE="http://fatrat.dolezel.info/"

LICENSE="GPL-2"
SLOT="0"
IUSE="-debug"
RESTRICT="mirror"

RDEPEND="${DEPEND}"

fatrat-plugin_src_compile() {
	use debug && myconf="-DCMAKE_BUILD_TYPE=Debug"
	cmake . -DCMAKE_INSTALL_PREFIX="/usr" ${myconf} || die "cmake failed"
	emake || die "emake failed"
}

fatrat-plugin_src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
}

EXPORT_FUNCTIONS src_compile src_install