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

Diff of /eclass/mythtv.eclass

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

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

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20