blob: aea032ba16d9b92ea8e41cc8f234b8e522698bd5 [file] [log] [blame]
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="4"
inherit webapp eutils
DESCRIPTION="ruTorrent is a front-end for the popular Bittorrent client rTorrent"
HOMEPAGE="https://github.com/Novik/ruTorrent"
SRC_URI="
https://rutorrent.googlecode.com/files/${P}.tar.gz
https://rutorrent.googlecode.com/files/plugins-${PV}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
IUSE=""
need_httpd_cgi
DEPEND="
|| ( dev-lang/php[xml,gd] dev-lang/php[xml,gd-external] )
"
RDEPEND="virtual/httpd-php"
S="${WORKDIR}"
pkg_setup() {
webapp_pkg_setup
}
src_install() {
webapp_src_preinst
insinto "${MY_HTDOCSDIR}"
mv plugins rutorrent
cd rutorrent
doins -r .
chmod +x "${ED}${MY_HTDOCSDIR}"/plugins/*/*.sh \
"$ED${MY_HTDOCSDIR}"/php/test.sh || die "chmod failed"
webapp_serverowned "${MY_HTDOCSDIR}"/share
webapp_serverowned "${MY_HTDOCSDIR}"/share/settings
webapp_serverowned "${MY_HTDOCSDIR}"/share/torrents
webapp_serverowned "${MY_HTDOCSDIR}"/share/users
webapp_configfile "${MY_HTDOCSDIR}"/conf/.htaccess
webapp_configfile "${MY_HTDOCSDIR}"/conf/config.php
webapp_configfile "${MY_HTDOCSDIR}"/conf/access.ini
webapp_configfile "${MY_HTDOCSDIR}"/conf/plugins.ini
webapp_configfile "${MY_HTDOCSDIR}"/share/.htaccess
webapp_src_install
}