# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: # # @ECLASS: mythtv.eclass # @AUTHOR: Doug Goldstein # @MAINTAINER: Doug Goldstein # @BLURB: Downloads the MythTV source packages and any patches from the fixes branch # inherit eutils versionator SHORT="$(echo ${MYTHTV_COMMIT} | cut -c1-7)" # Release version MY_PV="${PV%_*}" # what product do we want case "${PN}" in mythtv) MY_PN="mythtv";; mythtv-themes) MY_PN="myththemes";; mythweb) MY_PN="mythweb";; *) MY_PN="mythplugins";; esac # _pre is from SVN trunk while _p and _beta are from SVN ${MY_PV}-fixes # TODO: probably ought to do something smart if the regex doesn't match anything [[ "${PV}" =~ (_alpha|_beta|_pre|_rc|_p)([0-9]+) ]] || { eerror "Invalid version requested (_alpha|_beta|_pre|_rc|_p) only" exit 1 } REV_PREFIX="${BASH_REMATCH[1]}" # _alpha, _beta, _pre, _rc, or _p MYTHTV_REV="${BASH_REMATCH[2]}" # revision number case $REV_PREFIX in _pre|_alpha) MYTHTV_REPO="master";; _p|_beta|_rc) VER_COMP=( $(get_version_components ${MY_PV}) ) FIXES_VER="${VER_COMP[0]}.${VER_COMP[1]}" MYTHTV_REPO="tree/fixes/${FIXES_VER}";; esac HOMEPAGE="http://www.mythtv.org" LICENSE="GPL-2" if [[ ${MY_PN} == "mythtv" ]]; then # this works for plugins and core SRC_URI="https://github.com/MythTV/mythtv/tarball/${MYTHTV_COMMIT} -> mythtv-${PV}-${SHORT}.tar.gz" S="${WORKDIR}/MythTV-mythtv-${SHORT}/${MY_PN}" elif [[ ${MY_PN} == "mythplugins" ]]; then # this works for plugins and core. need a working or statement SRC_URI="https://github.com/MythTV/mythtv/tarball/${MYTHTV_COMMIT} -> mythtv-${PV}-${SHORT}.tar.gz" S="${WORKDIR}/MythTV-mythtv-${SHORT}/${MY_PN}" else # this should be suitably generic for themes and web SRC_URI="https://github.com/MythTV/${MY_PN}/tarball/${MYTHTV_COMMIT} -> ${PN}-${PV}-${SHORT}.tar.gz" S="${WORKDIR}/MythTV-${MY_PN}-${SHORT}" fi