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