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

Diff of /eclass/mythtv.eclass

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

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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20