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

Diff of /eclass/mythtv.eclass

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

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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20