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"
29 DEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
30 dev-python/setuptools[${PYTHON_USEDEP}]
32 RDEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
33 dev-python/chardet[${PYTHON_USEDEP}]
34 dev-python/pyopenssl[${PYTHON_USEDEP}]
35 dev-python/pyxdg[${PYTHON_USEDEP}]
36 >=dev-python/twisted-core-8.1[${PYTHON_USEDEP}]
37 >=dev-python/twisted-web-8.1[${PYTHON_USEDEP}]
38 geoip? ( dev-libs/geoip )
40 sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
41 dev-python/pygobject:2[${PYTHON_USEDEP}]
42 >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
44 libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
46 setproctitle? ( dev-python/setproctitle[${PYTHON_USEDEP}] )
47 webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
49 python_prepare_all() {
51 "${FILESDIR}"/${PN}-1.3.5-disable_libtorrent_internal_copy.patch
54 distutils-r1_python_prepare_all
57 _distutils-r1_create_setup_cfg() {
58 # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
59 # Override this call from the distutils-r1 eclass.
60 # This does not respect the distutils-r1 API. DONOT copy this example.
64 python_install_all() {
65 distutils-r1_python_install_all
66 newinitd "${FILESDIR}"/deluged.init deluged
67 newconfd "${FILESDIR}"/deluged.conf deluged
68 systemd_dounit "${FILESDIR}"/deluged.service
69 systemd_dounit "${FILESDIR}"/deluge-web.service
74 elog "If after upgrading it doesn't work, please remove the"
75 elog "'~/.config/deluge' directory and try again, but make a backup"
78 elog "To start the daemon either run 'deluged' as user"
79 elog "or modify /etc/conf.d/deluged and run"
80 elog "/etc/init.d/deluged start as root"
81 elog "You can still use deluge the old way"
83 elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"