/[gentoo-x86]/eclass/mythtv.eclass
Gentoo

Diff of /eclass/mythtv.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.12
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv.eclass,v 1.4 2007/03/19 02:58:08 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv.eclass,v 1.12 2008/03/06 20:43:16 cardoe Exp $
4# 4#
5# @ECLASS: mythtv.eclass
5# Author: Doug Goldstein <cardoe@gentoo.org> 6# @MAINTAINER: Doug Goldstein <cardoe@gentoo.org>
7# @BLURB: Downloads the MythTV source packages and any patches from the fixes branch
6# 8#
7# Downloads the MythTV source packages and any patches from the fixes branch 9
8# 10inherit eutils versionator subversion
9inherit eutils
10 11
11# Release version 12# Release version
12MY_PV="${PV%_*}" 13MY_PV="${PV%_*}"
13 14
14# _pre is from SVN trunk while _p is from SVN ${MY_PV}-fixes 15# what product do we want
15if [[ ${MY_PV} != ${PV} ]]; then 16case "${PN}" in
16 if [[ $PV = *_pre* ]]; then 17 mythtv) MY_PN="mythtv";;
17 SVNREV="${PV##*_pre}" 18 mythtv-themes) MY_PN="myththemes";;
18 elif [[ $PV = *_p* ]]; then 19 *) MY_PN="mythplugins";;
19 PATCHREV="${PV##*_p}" 20esac
20 fi
21fi
22 21
23if [[ ${PN} = mythtv ]]; then 22# _pre is from SVN trunk while _p and _beta are from SVN ${MY_PV}-fixes
24 MY_PN="mythtv" 23# TODO: probably ought to do something smart if the regex doesn't match anything
25else 24[[ "${PV}" =~ (_beta|_pre|_p|_alpha)([0-9]+) ]] || {
26 MY_PN="mythplugins" 25 eerror "Invalid version requested (_alpha|_beta|_pre|_p) only"
27fi 26 exit 1
27}
28
29REV_PREFIX="${BASH_REMATCH[1]}" # _beta, _pre, or _p
30MYTHTV_REV="${BASH_REMATCH[2]}" # revision number
31
32case $REV_PREFIX in
33 _pre|_alpha) MYTHTV_REPO="trunk/${MY_PN}";;
34 _p|_beta) VER_COMP=( $(get_version_components ${MY_PV}) )
35 FIXES_VER="${VER_COMP[0]}-${VER_COMP[1]}"
36 MYTHTV_REPO="branches/release-${FIXES_VER}-fixes/${MY_PN}";;
37esac
38
39ESVN_REPO_URI="http://svn.mythtv.org/svn/${MYTHTV_REPO}@${MYTHTV_REV}"
28 40
29HOMEPAGE="http://www.mythtv.org" 41HOMEPAGE="http://www.mythtv.org"
30LICENSE="GPL-2" 42LICENSE="GPL-2"
31SRC_URI="" 43SRC_URI=""
32if [[ -z ${SVNREV} ]] ; then
33 SRC_URI="${SRC_URI} mirror://gentoo/${MY_PN}-${MY_PV}.tar.bz2"
34fi
35if [[ -n ${PATCHREV} ]] ; then
36 SRC_URI="${SRC_URI}
37 http://dev.gentoo.org/~cardoe/files/mythtv/${MY_PN}-${MY_PV}_svn${PATCHREV}.patch.bz2"
38fi
39
40mythtv-fixes_patch() {
41 if [[ -n ${PATCHREV} ]]; then
42 epatch ${WORKDIR}/${MY_PN}-${MY_PV}_svn${PATCHREV}.patch
43 fi
44}

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20