# 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="TV shows PVR & episode guide" #HOMEPAGE="http://github.com/midgetspy/${MY_PN}" HOMEPAGE=="https://github.com/SickBeard-Team/SickBeard" 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/midgetspy/Sick-Beard.git" #EGIT_BRANCH="develop" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="-cherrypy +notify" RDEPEND="" DEPEND="${RDEPEND} notify? ( dev-python/notify-python ) cherrypy? ( >=dev-python/cherrypy-3.2.0 ) 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 sickb_dir in autoProcessTV data lib sickbeard tests; do doins -r ${sickb_dir} || die "failed to install ${sickb_dir}" done use cherrypy || doins -r cherrypy || die "failed to install cherrypy" doins SickBeard.py || die "failed to install SickBeard.py" # Create run, log & cache directories for sickb_runtime_dir in run log cache ; do keepdir /var/${sickb_runtime_dir}/${PN} fowners -R sabnzbd:sabnzbd /var/${sickb_runtime_dir}/${PN} fperms -R 775 /var/${sickb_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 # Install extra binaries from patchset insinto /usr/lib/${PN}/data/images/subtitles newins "${FILESDIR}/tvsubtitles.png" "tvsubtitles.png" # Fix perms fowners -R root:sabnzbd /usr/lib/${PN} fperms -R 775 /usr/lib/${PN} } pkg_postinst() { # Optimize python_mod_optimize "/usr/lib/${PN}" einfo "There's an example config file for addic7ed login in FILESDIR" einfo "Put it in /var/lib/sabnzbd/.config/subliminal" einfo "And make sure that's owned by sabnzbd:sabnzbd @ ug+rwX" }