gnu: mes: Update to 0.11.
[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 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
8 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages bittorrent)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (guix build-system glib-or-gtk)
33 #:use-module ((guix licenses) #:prefix l:)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages adns)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages crypto)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages cyrus-sasl)
42 #:use-module (gnu packages databases)
43 #:use-module (gnu packages file)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages gnupg)
47 #:use-module (gnu packages gstreamer)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages libevent)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages multiprecision)
52 #:use-module (gnu packages nettle)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages ssh)
57 #:use-module (gnu packages tls)
58 #:use-module (gnu packages xml))
59
60 (define-public transmission
61 (package
62 (name "transmission")
63 (version "2.92")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append
67 "https://transmission.cachefly.net/transmission-"
68 version ".tar.xz"))
69 (sha256
70 (base32
71 "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s"))))
72 (build-system glib-or-gtk-build-system)
73 (outputs '("out" ; library and command-line interface
74 "gui")) ; graphical user interface
75 (arguments
76 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
77 #:phases
78 (modify-phases %standard-phases
79 (add-after 'install 'move-gui
80 (lambda* (#:key outputs #:allow-other-keys)
81 ;; Move the GUI to its own output, so that "out" doesn't
82 ;; depend on GTK+.
83 (let ((out (assoc-ref outputs "out"))
84 (gui (assoc-ref outputs "gui")))
85 (mkdir-p (string-append gui "/bin"))
86 (rename-file (string-append out "/bin/transmission-gtk")
87 (string-append gui
88 "/bin/transmission-gtk"))
89
90 ;; Move the '.desktop' file as well.
91 (mkdir (string-append gui "/share"))
92 (rename-file (string-append out "/share/applications")
93 (string-append gui "/share/applications")))
94 #t)))))
95 (inputs
96 `(("inotify-tools" ,inotify-tools)
97 ("libevent" ,libevent)
98 ("curl" ,curl)
99 ("cyrus-sasl" ,cyrus-sasl)
100 ("openssl" ,openssl)
101 ("file" ,file)
102 ("zlib" ,zlib)
103 ("gtk+" ,gtk+)))
104 (native-inputs
105 `(("intltool" ,intltool)
106 ("pkg-config" ,pkg-config)))
107 (home-page "http://www.transmissionbt.com/")
108 (synopsis "Fast and easy BitTorrent client")
109 (description
110 "Transmission is a BitTorrent client that comes with graphical,
111 textual, and Web user interfaces. Transmission also has a daemon for
112 unattended operations. It supports local peer discovery, full encryption,
113 DHT, µTP, PEX and Magnet Links.")
114
115 ;; COPYING reads:
116 ;;
117 ;; Transmission can be redistributed and/or modified under the terms of
118 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
119 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
120 ;; or any future license endorsed by Mnemosyne LLC.
121 ;;
122 ;; A few files files carry an MIT/X11 license header.
123 (license l:gpl3+)))
124
125 (define-public libtorrent
126 (package
127 (name "libtorrent")
128 (version "0.13.6")
129 (source (origin
130 (method url-fetch)
131 (uri (string-append
132 "http://rtorrent.net/downloads/libtorrent-"
133 version ".tar.gz"))
134 (sha256
135 (base32
136 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
137 (build-system gnu-build-system)
138 (inputs `(("openssl" ,openssl)
139 ("zlib" ,zlib)))
140 (native-inputs `(("pkg-config" ,pkg-config)
141 ("cppunit" ,cppunit)))
142 (synopsis "BitTorrent library of rtorrent")
143 (description
144 "LibTorrent is a BitTorrent library used by and developed in parallel
145 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
146 speed and efficiency.")
147 (home-page "https://github.com/rakshasa/libtorrent")
148 (license l:gpl2+)))
149
150 (define-public rtorrent
151 (package
152 (name "rtorrent")
153 (version "0.9.6")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append
157 "http://rtorrent.net/downloads/rtorrent-"
158 version ".tar.gz"))
159 (sha256
160 (base32
161 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
162 (build-system gnu-build-system)
163 (inputs `(("libtorrent" ,libtorrent)
164 ("ncurses" ,ncurses)
165 ("curl" ,curl)
166 ("cyrus-sasl" ,cyrus-sasl)
167 ("openssl" ,openssl)
168 ("zlib" ,zlib)))
169 (native-inputs `(("pkg-config" ,pkg-config)
170 ("cppunit" ,cppunit)))
171 (synopsis "BitTorrent client with ncurses interface")
172 (description
173 "rTorrent is a BitTorrent client with an ncurses interface. It supports
174 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
175 XML-RPC over SCGI.")
176 (home-page "https://github.com/rakshasa/rtorrent")
177 (license l:gpl2+)))
178
179 (define-public tremc
180 (let ((commit "9755b50e9444566cff02c977edafdbb3e9750cbb")
181 (revision "1"))
182 (package
183 (name "tremc")
184 (version (git-version "0.9.0" revision commit))
185 (source
186 (origin
187 (method git-fetch)
188 (uri (git-reference
189 (url "https://github.com/louipc/tremc.git")
190 (commit commit)))
191 (file-name (git-file-name name version))
192 (sha256
193 (base32
194 "05259qss5jka5ygwrh7cngyp6cgazbynji5pshgfzrd2d43pyfq5"))))
195 (build-system python-build-system)
196 (arguments
197 `(#:tests? #f ; no test suite
198 #:phases
199 (modify-phases %standard-phases
200 ;; The software is just a Python script that must be
201 ;; copied into place.
202 (delete 'build)
203 (replace 'install
204 (lambda* (#:key outputs #:allow-other-keys)
205 (let* ((out (assoc-ref outputs "out"))
206 (bin (string-append out "/bin"))
207 (man (string-append out "/share/man/man1"))
208 ;; FIXME install zsh completions
209 (completions (string-append out "/etc/bash_completion.d")))
210 (install-file "tremc" bin)
211 (install-file "tremc.1" man)
212 (install-file
213 (string-append
214 "completion/bash/"
215 "transmission-remote-cli-bash-completion.sh")
216 completions)))))))
217 (synopsis "Console client for the Transmission BitTorrent daemon")
218 (description "Tremc is a console client, with a curses interface, for the
219 Transmission BitTorrent daemon.")
220 (home-page "https://github.com/louipc/tremc")
221 (license l:gpl3+))))
222
223 (define-public transmission-remote-cli
224 (package
225 (name "transmission-remote-cli")
226 (version "1.7.1")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "https://github.com/fagga/"
230 "transmission-remote-cli/archive/v"
231 version ".tar.gz"))
232 (file-name (string-append name "-" version ".tar.gz"))
233 (sha256
234 (base32
235 "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"))))
236 (build-system python-build-system)
237 (arguments
238 `(#:python ,python-2 ; only supports Python 2
239 #:tests? #f ; no test suite
240 #:phases (modify-phases %standard-phases
241 ;; The software is just a Python script that must be
242 ;; copied into place.
243 (delete 'build)
244 (replace 'install
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let* ((out (assoc-ref outputs "out"))
247 (bin (string-append out "/bin"))
248 (man (string-append out "/share/man/man1"))
249 ;; FIXME install zsh completions
250 (completions (string-append out "/etc/bash_completion.d")))
251 (install-file "transmission-remote-cli" bin)
252 (install-file "transmission-remote-cli.1" man)
253 (install-file
254 (string-append
255 "completion/bash/"
256 "transmission-remote-cli-bash-completion.sh")
257 completions)))))))
258 (synopsis "Console client for the Transmission BitTorrent daemon")
259 (description "Transmission-remote-cli is a console client, with a curses
260 interface, for the Transmission BitTorrent daemon. This package is no longer
261 maintained upstream.")
262 (home-page "https://github.com/fagga/transmission-remote-cli")
263 (license l:gpl3+)
264 (properties `((superseded . ,tremc)))))
265
266 (define-public aria2
267 (package
268 (name "aria2")
269 (version "1.33.1")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
273 "releases/download/release-" version "/"
274 name "-" version ".tar.xz"))
275 (sha256
276 (base32
277 "06syqxia701dk96rcbhnd4x0arjj6d22gm3aqksz38am9y2f8f95"))))
278 (build-system gnu-build-system)
279 (arguments
280 `(#:configure-flags (list "--enable-libaria2"
281 (string-append "--with-bashcompletiondir="
282 %output "/etc/bash_completion.d/"))
283 #:phases
284 (modify-phases %standard-phases
285 (add-after 'unpack 'delete-socket-tests
286 (lambda _
287 (substitute* "test/LpdMessageDispatcherTest.cc"
288 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
289 (string-append "// " text)))
290 (substitute* "test/LpdMessageReceiverTest.cc"
291 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
292 (string-append "// " text)))
293 #t)))))
294 (native-inputs
295 `(("cppunit" ,cppunit) ; for the tests
296 ("pkg-config" ,pkg-config)))
297 (inputs
298 `(("c-ares" ,c-ares)
299 ("gnutls" ,gnutls)
300 ("gmp" ,gmp)
301 ("libssh2" ,libssh2)
302 ("libxml2" ,libxml2)
303 ("nettle" ,nettle)
304 ("sqlite" ,sqlite)
305 ("zlib" ,zlib)))
306 (home-page "https://aria2.github.io/")
307 (synopsis "Utility for parallel downloading files")
308 (description
309 "Aria2 is a lightweight, multi-protocol & multi-source command-line
310 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
311 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
312 (license l:gpl2+)))
313
314 (define-public uget
315 (package
316 (name "uget")
317 (version "2.0.8")
318 (source (origin
319 (method url-fetch)
320 (uri (string-append "mirror://sourceforge/urlget/"
321 "uget%20%28stable%29/" version "/uget-"
322 version ".tar.gz"))
323 (sha256
324 (base32
325 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
326 (build-system gnu-build-system)
327 (native-inputs
328 `(("intltool" ,intltool)))
329 (inputs
330 `(("curl" ,curl)
331 ("gtk+" ,gtk+)
332 ("glib" ,glib)
333 ("gnutls" ,gnutls)
334 ("gstreamer" ,gstreamer)
335 ("libgcrypt" ,libgcrypt)
336 ("libnotify" ,libnotify)
337 ("openssl" ,openssl)))
338 (native-inputs
339 `(("intltool" ,intltool)
340 ("pkg-config" ,pkg-config)))
341 (home-page "http://ugetdm.com/")
342 (synopsis "Universal download manager with GTK+ interface")
343 (description
344 "uGet is portable download manager with GTK+ interface supporting
345 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
346 downloads, download scheduling, download rate limiting.")
347 (license l:lgpl2.1+)))
348
349 (define-public mktorrent
350 (package
351 (name "mktorrent")
352 (version "1.0")
353 (source (origin
354 (method url-fetch)
355 (uri (string-append "mirror://sourceforge/mktorrent/mktorrent/"
356 version "/" name "-" version ".tar.gz"))
357 (sha256
358 (base32
359 "17qi3nfky240pq6qcmf5qg324mxm83vk9r3nvsdhsvinyqm5d3kg"))))
360 (build-system gnu-build-system)
361 (arguments
362 `(#:phases (modify-phases %standard-phases
363 (delete 'configure)) ; no configure script
364 #:make-flags (list "CC=gcc"
365 (string-append "PREFIX=" (assoc-ref %outputs "out"))
366 "NO_HASH_CHECK=1"
367 "USE_LARGE_FILES=1"
368 "USE_LONG_OPTIONS=1"
369 "USE_PTHREADS=1")
370 #:tests? #f)) ; no tests
371 (home-page "http://mktorrent.sourceforge.net/")
372 (synopsis "Utility to create BitTorrent metainfo files")
373 (description "mktorrent is a simple command-line utility to create
374 BitTorrent @dfn{metainfo} files, often known simply as @dfn{torrents}, from
375 both single files and whole directories. It can add multiple trackers and web
376 seed URLs, and set the @code{private} flag to disallow advertisement through
377 the distributed hash table (DHT) and Peer Exchange. Hashing is multi-threaded
378 and will take advantage of multiple processor cores where possible.")
379 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
380 l:gpl2+)))) ; with permission to link with OpenSSL
381
382 (define-public libtorrent-rasterbar
383 (package
384 (name "libtorrent-rasterbar")
385 (version "1.1.2")
386 (source (origin
387 (method url-fetch)
388 (uri
389 (string-append
390 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
391 (string-join (string-split version #\.) "_")
392 "/libtorrent-rasterbar-" version ".tar.gz"))
393 (patches
394 (search-patches "libtorrent-rasterbar-boost-compat.patch"))
395 (sha256
396 (base32
397 "16im9qsmfrmmkhfjpij9739nqpn4s6wgc9cikdxbcyshfhimzra5"))))
398 (build-system gnu-build-system)
399 (arguments
400 `(#:configure-flags
401 (list (string-append "--with-boost-libdir="
402 (assoc-ref %build-inputs "boost")
403 "/lib")
404 "--enable-python-binding"
405 "--enable-tests")
406 #:make-flags (list
407 (string-append "LDFLAGS=-Wl,-rpath="
408 (assoc-ref %outputs "out") "/lib"))))
409 (inputs `(("boost" ,boost)
410 ("openssl" ,openssl)))
411 (native-inputs `(("python" ,python-2)
412 ("pkg-config" ,pkg-config)))
413 (home-page "http://www.rasterbar.com/products/libtorrent/")
414 (synopsis "Feature complete BitTorrent implementation")
415 (description
416 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
417 focusing on efficiency and scalability. It runs on embedded devices as well as
418 desktops.")
419 (license l:bsd-2)))
420
421