# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ EAPI="3" PYTHON_DEPEND="2:2.6" inherit eutils git-2 python MY_PN="${PN/s/S}" MY_PN="${MY_PN/b/B}" DESCRIPTION="CouchPotato (CP) is an automatic NZB and torrent downloader." #HOMEPAGE="http://github.com/midgetspy/${MY_PN}" HOMEPAGE=="http://couchpotatoapp.com/" SRC_URI="" #EGIT_REPO_URI="http://github.com/midgetspy/${MY_PN}.git" #EGIT_REPO_URI="https://github.com/SickBeard-Team/SickBeard.git" EGIT_REPO_URI="https://github.com/RuudBurger/CouchPotatoServer.git" #EGIT_BRANCH="develop" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="-cherrypy +notify" RDEPEND="" DEPEND="${RDEPEND} notify? ( dev-python/notify-python ) dev-python/cheetah net-nntp/sabnzbd" DOCS=( "COPYING.txt" "readme.md" ) pkg_setup() { python_set_active_version 2 } #src_prepare() { # Fix a few subtitles related things #epatch "${FILESDIR}/${PN}-subtitles-tweaks.patch" #} src_install() { # Init script newconfd "${FILESDIR}/${PN}.conf" "${PN}" newinitd "${FILESDIR}/${PN}.init" "${PN}" # Install dodir /usr/lib/${PN} insinto /usr/lib/${PN} for cp_dir in libs couchpotato; do doins -r ${cp_dir} || die "failed to install ${cp_dir}" done doins CouchPotato.py || die "failed to install SickBeard.py" # Create run, log & cache directories for cp_runtime_dir in run log cache ; do keepdir /var/${cp_runtime_dir}/${PN} fowners -R sabnzbd:sabnzbd /var/${cp_runtime_dir}/${PN} fperms -R 775 /var/${cp_runtime_dir}/${PN} done # Create data directory keepdir /var/lib/${PN} fowners -R sabnzbd:sabnzbd /var/lib/${PN} fperms -R 775 /var/lib/${PN} # Install bare-bone config file (NOTE: AFAICT, sickbeard will *always* look for it in its basedir...) insinto /usr/lib/${PN} newins "${FILESDIR}/config.ini" "config.ini" fowners root:sabnzbd /usr/lib/${PN}/config.ini fperms 660 /usr/lib/${PN}/config.ini # Fix perms fowners -R root:sabnzbd /usr/lib/${PN} fperms -R 775 /usr/lib/${PN} } pkg_postinst() { # Optimize python_mod_optimize "/usr/lib/${PN}" }