1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_7 )
8 DISTUTILS_SINGLE_IMPL=1
9 inherit distutils-r1 eutils systemd
11 DESCRIPTION="BitTorrent client with a client/server model"
12 HOMEPAGE="http://deluge-torrent.org/"
14 if [[ ${PV} == 9999 ]]; then
16 EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
17 http://git.deluge-torrent.org/${PN}"
21 SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
22 KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
27 IUSE="geoip gtk libnotify setproctitle sound webinterface"
28 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
30 DEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
31 dev-python/setuptools[${PYTHON_USEDEP}]
33 RDEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
34 dev-python/chardet[${PYTHON_USEDEP}]
35 dev-python/pyopenssl[${PYTHON_USEDEP}]
36 dev-python/pyxdg[${PYTHON_USEDEP}]
37 >=dev-python/twisted-core-8.1[${PYTHON_USEDEP}]
38 >=dev-python/twisted-web-8.1[${PYTHON_USEDEP}]
39 geoip? ( dev-libs/geoip )
41 sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
42 dev-python/pygobject:2[${PYTHON_USEDEP}]
43 >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
45 libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
47 setproctitle? ( dev-python/setproctitle[${PYTHON_USEDEP}] )
48 webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
50 python_prepare_all() {
52 "${FILESDIR}"/${PN}-1.3.5-disable_libtorrent_internal_copy.patch
55 distutils-r1_python_prepare_all
58 _distutils-r1_create_setup_cfg() {
59 # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
60 # Override this call from the distutils-r1 eclass.
61 # This does not respect the distutils-r1 API. DONOT copy this example.
65 python_install_all() {
66 distutils-r1_python_install_all
67 newinitd "${FILESDIR}"/deluged.init deluged
68 newconfd "${FILESDIR}"/deluged.conf deluged
69 systemd_dounit "${FILESDIR}"/deluged.service
70 systemd_dounit "${FILESDIR}"/deluge-web.service
75 elog "If after upgrading it doesn't work, please remove the"
76 elog "'~/.config/deluge' directory and try again, but make a backup"
79 elog "To start the daemon either run 'deluged' as user"
80 elog "or modify /etc/conf.d/deluged and run"
81 elog "/etc/init.d/deluged start as root"
82 elog "You can still use deluge the old way"
84 elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"