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/mythtv.eclass,v 1.20 2009/11/16 07:59:47 cardoe Exp $ |
4 |
|
5 |
# @ECLASS: mythtv.eclass |
6 |
# @MAINTAINER: |
7 |
# Doug Goldstein <cardoe@gentoo.org> |
8 |
# @AUTHOR: |
9 |
# Doug Goldstein <cardoe@gentoo.org> |
10 |
# @BLURB: Downloads the MythTV source packages and any patches from the fixes branch |
11 |
|
12 |
inherit versionator |
13 |
|
14 |
# temporary until all the packagers are fixed for bug #283798 |
15 |
DEPEND="app-arch/unzip" |
16 |
|
17 |
# Release version |
18 |
MY_PV="${PV%_*}" |
19 |
|
20 |
# what product do we want |
21 |
case "${PN}" in |
22 |
mythtv) MY_PN="mythtv";; |
23 |
mythtv-themes) MY_PN="myththemes";; |
24 |
mythtv-themes-extra) MY_PN="themes";; |
25 |
*) MY_PN="mythplugins";; |
26 |
esac |
27 |
|
28 |
# _pre is from SVN trunk while _p and _beta are from SVN ${MY_PV}-fixes |
29 |
# TODO: probably ought to do something smart if the regex doesn't match anything |
30 |
[[ "${PV}" =~ (_alpha|_beta|_pre|_rc|_p)([0-9]+) ]] || { |
31 |
eerror "Invalid version requested (_alpha|_beta|_pre|_rc|_p) only" |
32 |
exit 1 |
33 |
} |
34 |
|
35 |
REV_PREFIX="${BASH_REMATCH[1]}" # _alpha, _beta, _pre, _rc, or _p |
36 |
MYTHTV_REV="${BASH_REMATCH[2]}" # revision number |
37 |
|
38 |
case $REV_PREFIX in |
39 |
_pre|_alpha) MYTHTV_REPO="trunk";; |
40 |
_p|_beta|_rc) VER_COMP=( $(get_version_components ${MY_PV}) ) |
41 |
FIXES_VER="${VER_COMP[0]}-${VER_COMP[1]}" |
42 |
MYTHTV_REPO="branches/release-${FIXES_VER}-fixes";; |
43 |
esac |
44 |
|
45 |
HOMEPAGE="http://www.mythtv.org" |
46 |
LICENSE="GPL-2" |
47 |
SRC_URI="http://svn.mythtv.org/trac/changeset/${MYTHTV_REV}/${MYTHTV_REPO}/${MY_PN}?old_path=%2F&format=zip -> ${MY_PN}-${PV}.zip" |
48 |
S="${WORKDIR}/${MYTHTV_REPO}/${MY_PN}" |