gnu: libtorrent-rasterbar: Update to 1.2.7.
[jackhill/guix/guix.git] / gnu / packages / bittorrent.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
9 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
10 ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
11 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages bittorrent)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system python)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module ((guix licenses) #:prefix l:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages adns)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages cyrus-sasl)
45 #:use-module (gnu packages freedesktop)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages gstreamer)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages nettle)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-crypto)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages qt)
60 #:use-module (gnu packages sqlite)
61 #:use-module (gnu packages ssh)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages xml))
64
65 (define-public transmission
66 (package
67 (name "transmission")
68 (version "3.00")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/transmission/transmission"
72 "/releases/download/" version "/transmission-"
73 version ".tar.xz"))
74 (sha256
75 (base32
76 "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))))
77 (build-system glib-or-gtk-build-system)
78 (outputs '("out" ; library and command-line interface
79 "gui")) ; graphical user interface
80 (arguments
81 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
82 #:phases
83 (modify-phases %standard-phases
84 (add-after 'install 'move-gui
85 (lambda* (#:key outputs #:allow-other-keys)
86 ;; Move the GUI to its own output, so that "out" doesn't
87 ;; depend on GTK+.
88 (let ((out (assoc-ref outputs "out"))
89 (gui (assoc-ref outputs "gui")))
90 (mkdir-p (string-append gui "/bin"))
91 (rename-file (string-append out "/bin/transmission-gtk")
92 (string-append gui "/bin/transmission-gtk"))
93
94 ;; Move the '.desktop' and icon files as well.
95 (mkdir (string-append gui "/share"))
96 (for-each
97 (lambda (dir)
98 (rename-file (string-append out "/share/" dir)
99 (string-append gui "/share/" dir)))
100 '("applications" "icons" "pixmaps")))
101 #t)))))
102 (inputs
103 `(("libevent" ,libevent)
104 ("curl" ,curl)
105 ("openssl" ,openssl)
106 ("zlib" ,zlib)
107 ("gtk+" ,gtk+)))
108 (native-inputs
109 `(("intltool" ,intltool)
110 ("pkg-config" ,pkg-config)))
111 (home-page "https://transmissionbt.com/")
112 (synopsis "Fast and easy BitTorrent client")
113 (description
114 "Transmission is a BitTorrent client that comes with graphical,
115 textual, and Web user interfaces. Transmission also has a daemon for
116 unattended operations. It supports local peer discovery, full encryption,
117 DHT, µTP, PEX and Magnet Links.")
118
119 ;; COPYING reads:
120 ;;
121 ;; Transmission can be redistributed and/or modified under the terms of
122 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
123 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
124 ;; or any future license endorsed by Mnemosyne LLC.
125 ;;
126 ;; A few files files carry an MIT/X11 license header.
127 (license (list l:gpl2 l:gpl3))))
128
129 (define-public libtorrent
130 (package
131 (name "libtorrent")
132 (version "0.13.8")
133 (source (origin
134 (method url-fetch)
135 (uri (string-append
136 "http://rtorrent.net/downloads/libtorrent-"
137 version ".tar.gz"))
138 (sha256
139 (base32
140 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
141 (build-system gnu-build-system)
142 (inputs `(("openssl" ,openssl)
143 ("zlib" ,zlib)))
144 (native-inputs `(("pkg-config" ,pkg-config)
145 ("cppunit" ,cppunit)))
146 (synopsis "BitTorrent library of rtorrent")
147 (description
148 "LibTorrent is a BitTorrent library used by and developed in parallel
149 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
150 speed and efficiency.")
151 (home-page "https://github.com/rakshasa/libtorrent")
152 (license l:gpl2+)))
153
154 (define-public rtorrent
155 (package
156 (name "rtorrent")
157 (version "0.9.8")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append
161 "http://rtorrent.net/downloads/rtorrent-"
162 version ".tar.gz"))
163 (sha256
164 (base32
165 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
166 (build-system gnu-build-system)
167 (inputs `(("libtorrent" ,libtorrent)
168 ("ncurses" ,ncurses)
169 ("curl" ,curl)
170 ("cyrus-sasl" ,cyrus-sasl)
171 ("openssl" ,openssl)
172 ("zlib" ,zlib)))
173 (native-inputs `(("pkg-config" ,pkg-config)
174 ("cppunit" ,cppunit)))
175 (synopsis "BitTorrent client with ncurses interface")
176 (description
177 "rTorrent is a BitTorrent client with an ncurses interface. It supports
178 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
179 XML-RPC over SCGI.")
180 (home-page "https://github.com/rakshasa/rtorrent")
181 (license l:gpl2+)))
182
183 (define-public tremc
184 (package
185 (name "tremc")
186 (version "0.9.2")
187 (source
188 (origin
189 (method git-fetch)
190 (uri (git-reference
191 (url "https://github.com/tremc/tremc")
192 (commit version)))
193 (file-name (git-file-name name version))
194 (sha256
195 (base32
196 "1fqspp2ckafplahgba54xmx0sjidx1pdzyjaqjhz0ivh98dkx2n5"))))
197 (build-system gnu-build-system)
198 (arguments
199 `(#:tests? #f ; no test suite
200 #:make-flags
201 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
202 #:phases
203 (modify-phases %standard-phases
204 ;; The software is just a Python script that must be copied into place.
205 (delete 'configure)
206 (delete 'build))))
207 (inputs
208 `(("python" ,python)))
209 (synopsis "Console client for the Transmission BitTorrent daemon")
210 (description "Tremc is a console client, with a curses interface, for the
211 Transmission BitTorrent daemon.")
212 (home-page "https://github.com/tremc/tremc")
213 (license l:gpl3+)))
214
215 (define-public transmission-remote-cli
216 (package
217 (name "transmission-remote-cli")
218 (version "1.7.1")
219 (source (origin
220 (method git-fetch)
221 (uri (git-reference
222 (url "https://github.com/fagga/transmission-remote-cli")
223 (commit (string-append "v" version))))
224 (file-name (git-file-name name version))
225 (sha256
226 (base32
227 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
228 (build-system python-build-system)
229 (arguments
230 `(#:python ,python-2 ; only supports Python 2
231 #:tests? #f ; no test suite
232 #:phases (modify-phases %standard-phases
233 ;; The software is just a Python script that must be
234 ;; copied into place.
235 (delete 'build)
236 (replace 'install
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let* ((out (assoc-ref outputs "out"))
239 (bin (string-append out "/bin"))
240 (man (string-append out "/share/man/man1"))
241 ;; FIXME install zsh completions
242 (completions (string-append out "/etc/bash_completion.d")))
243 (install-file "transmission-remote-cli" bin)
244 (install-file "transmission-remote-cli.1" man)
245 (install-file
246 (string-append
247 "completion/bash/"
248 "transmission-remote-cli-bash-completion.sh")
249 completions)))))))
250 (synopsis "Console client for the Transmission BitTorrent daemon")
251 (description "Transmission-remote-cli is a console client, with a curses
252 interface, for the Transmission BitTorrent daemon. This package is no longer
253 maintained upstream.")
254 (home-page "https://github.com/fagga/transmission-remote-cli")
255 (license l:gpl3+)
256 (properties `((superseded . ,tremc)))))
257
258 (define-public aria2
259 (package
260 (name "aria2")
261 (version "1.35.0")
262 (source (origin
263 (method url-fetch)
264 (uri (string-append "https://github.com/aria2/aria2/releases/"
265 "download/release-" version
266 "/aria2-" version ".tar.xz"))
267 (sha256
268 (base32
269 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
270 (build-system gnu-build-system)
271 (arguments
272 `(#:configure-flags (list "--enable-libaria2"
273 (string-append "--with-bashcompletiondir="
274 %output "/etc/bash_completion.d/"))
275 #:phases
276 (modify-phases %standard-phases
277 (add-after 'unpack 'delete-socket-tests
278 (lambda _
279 (substitute* "test/LpdMessageDispatcherTest.cc"
280 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
281 (string-append "// " text)))
282 (substitute* "test/LpdMessageReceiverTest.cc"
283 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
284 (string-append "// " text)))
285 #t)))))
286 (native-inputs
287 `(("cppunit" ,cppunit) ; for the tests
288 ("pkg-config" ,pkg-config)))
289 (inputs
290 `(("c-ares" ,c-ares)
291 ("gnutls" ,gnutls)
292 ("gmp" ,gmp)
293 ("libssh2" ,libssh2)
294 ("libxml2" ,libxml2)
295 ("nettle" ,nettle)
296 ("sqlite" ,sqlite)
297 ("zlib" ,zlib)))
298 (home-page "https://aria2.github.io/")
299 (synopsis "Utility for parallel downloading files")
300 (description
301 "Aria2 is a lightweight, multi-protocol & multi-source command-line
302 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
303 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
304 (license l:gpl2+)))
305
306 (define-public uget
307 (package
308 (name "uget")
309 (version "2.2.0")
310 (source
311 (origin
312 (method url-fetch)
313 (uri (string-append "mirror://sourceforge/urlget/"
314 "uget%20%28stable%29/" version "/uget-"
315 version ".tar.gz"))
316 (sha256
317 (base32 "0rg2mr2cndxvnjib8zm5dp7y2hgbvnqkz2j2jmg0xlzfh9d34b2m"))))
318 (build-system gnu-build-system)
319 (inputs
320 `(("curl" ,curl)
321 ("gtk+" ,gtk+)
322 ("glib" ,glib)
323 ("gnutls" ,gnutls)
324 ("gstreamer" ,gstreamer)
325 ("libgcrypt" ,libgcrypt)
326 ("libnotify" ,libnotify)
327 ("openssl" ,openssl)))
328 (native-inputs
329 `(("intltool" ,intltool)
330 ("pkg-config" ,pkg-config)))
331 (home-page "https://ugetdm.com/")
332 (synopsis "Universal download manager with GTK+ interface")
333 (description
334 "uGet is portable download manager with GTK+ interface supporting
335 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
336 downloads, download scheduling, download rate limiting.")
337 (license l:lgpl2.1+)))
338
339 (define-public mktorrent
340 (package
341 (name "mktorrent")
342 (version "1.1")
343 (source (origin
344 (method git-fetch)
345 (uri (git-reference
346 (url "https://github.com/Rudde/mktorrent")
347 (commit (string-append "v" version))))
348 (file-name (git-file-name name version))
349 (sha256
350 (base32
351 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
352 (build-system gnu-build-system)
353 (arguments
354 `(#:phases (modify-phases %standard-phases
355 (delete 'configure)) ; no configure script
356 #:make-flags (list "CC=gcc"
357 (string-append "PREFIX=" (assoc-ref %outputs "out"))
358 "NO_HASH_CHECK=1"
359 "USE_LARGE_FILES=1"
360 "USE_LONG_OPTIONS=1"
361 "USE_PTHREADS=1")
362 #:tests? #f)) ; no tests
363 (home-page "https://github.com/Rudde/mktorrent")
364 (synopsis "Utility to create BitTorrent metainfo files")
365 (description
366 "mktorrent is a simple command-line utility to create BitTorrent
367 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
368 files and whole directories. It can add multiple trackers and web seed URLs,
369 and set the @code{private} flag to disallow advertisement through the
370 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
371 and will take advantage of multiple processor cores where possible.")
372 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
373 l:gpl2+)))) ; with permission to link with OpenSSL
374
375 (define-public libtorrent-rasterbar
376 (package
377 (name "libtorrent-rasterbar")
378 (version "1.2.7")
379 (source (origin
380 (method url-fetch)
381 (uri
382 (string-append
383 "https://github.com/arvidn/libtorrent/releases/download/libtorrent_"
384 (string-join (string-split version #\.) "_")
385 "/libtorrent-rasterbar-" version ".tar.gz"))
386 (sha256
387 (base32
388 "001g35janbxi20c7jzsf3ii9mkagz4kdsp7f3sz5r0n0cng0c05w"))))
389 (build-system gnu-build-system)
390 (arguments
391 `(#:configure-flags
392 (list (string-append "--with-boost-libdir="
393 (assoc-ref %build-inputs "boost")
394 "/lib")
395 "--enable-python-binding"
396 "--enable-tests")
397 #:make-flags (list
398 (string-append "LDFLAGS=-Wl,-rpath="
399 (assoc-ref %outputs "out") "/lib"))))
400 (inputs `(("boost" ,boost)
401 ("openssl" ,openssl)))
402 (native-inputs `(("python" ,python-wrapper)
403 ("pkg-config" ,pkg-config)))
404 (home-page "https://www.libtorrent.org/")
405 (synopsis "Feature complete BitTorrent implementation")
406 (description
407 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
408 focusing on efficiency and scalability. It runs on embedded devices as well as
409 desktops.")
410 (license l:bsd-2)))
411
412 (define-public qbittorrent
413 (package
414 (name "qbittorrent")
415 (version "4.2.5")
416 (source
417 (origin
418 (method git-fetch)
419 (uri (git-reference
420 (url "https://github.com/qbittorrent/qBittorrent")
421 (commit (string-append "release-" version))))
422 (file-name (git-file-name name version))
423 (sha256
424 (base32 "1n613ylg6i9gisgk0dbr2kpfasyizrkdjff1r8smd4vri2qrdksn"))))
425 (build-system gnu-build-system)
426 (arguments
427 `(#:configure-flags
428 (list (string-append "--with-boost-libdir="
429 (assoc-ref %build-inputs "boost")
430 "/lib")
431 "--enable-debug"
432 "QMAKE_LRELEASE=lrelease")
433 #:modules ((guix build gnu-build-system)
434 (guix build qt-utils)
435 (guix build utils))
436 #:imported-modules (,@%gnu-build-system-modules
437 (guix build qt-utils))
438 #:phases
439 (modify-phases %standard-phases
440 (add-after 'install 'wrap-qt
441 (lambda* (#:key outputs #:allow-other-keys)
442 (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
443 #t)))))
444 (native-inputs
445 `(("pkg-config" ,pkg-config)
446 ("qttools" ,qttools)))
447 (inputs
448 `(("boost" ,boost)
449 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
450 ("openssl" ,openssl)
451 ("python" ,python-wrapper)
452 ("qtbase" ,qtbase)
453 ("qtsvg" ,qtsvg)
454 ("zlib" ,zlib)))
455 (home-page "https://www.qbittorrent.org/")
456 (synopsis "Graphical BitTorrent client")
457 (description
458 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
459 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
460
461 It aims to be a good alternative to all other BitTorrent clients out there.
462 qBittorrent is fast, stable and provides unicode support as well as many
463 features.")
464 (license l:gpl2+)))
465
466 (define-public deluge
467 (package
468 (name "deluge")
469 (version "1.3.15")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append
474 "http://download.deluge-torrent.org/source/deluge-"
475 version ".tar.xz"))
476 (sha256
477 (base32
478 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
479 (build-system python-build-system)
480 (inputs
481 `(("libtorrent" ,libtorrent-rasterbar)
482 ("python2-chardet" ,python2-chardet)
483 ("python2-pygtk" ,python2-pygtk)
484 ("python2-pyopenssl" ,python2-pyopenssl)
485 ("python2-pyxdg" ,python2-pyxdg)
486 ("python2-service-identity" ,python2-service-identity)
487 ("python2-twisted" ,python2-twisted)))
488 (native-inputs
489 `(("intltool" ,intltool)))
490 (arguments
491 `(#:python ,python-2))
492 (home-page "https://www.deluge-torrent.org/")
493 (synopsis "Fully-featured cross-platform ​BitTorrent client")
494 (description
495 "Deluge contains the common features to BitTorrent clients such as
496 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
497 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
498 speed limits. Deluge heavily utilises the ​libtorrent library. It is
499 designed to run as both a normal standalone desktop application and as a
500 ​client-server.")
501 (license l:gpl3+)))