gnu: Move ghostscript-with-x into (gnu packages ghostscript).
[jackhill/guix/guix.git] / gnu / packages / libusb.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
75be6b7c 3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3b48f78c 4;;;
233e7676 5;;; This file is part of GNU Guix.
3b48f78c 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
3b48f78c
NK
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
3b48f78c
NK
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
3b48f78c 19
1ffa7090 20(define-module (gnu packages libusb)
59a43334 21 #:use-module (gnu packages)
3b48f78c
NK
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
75be6b7c
AE
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages gnupg)
034e0d50 27 #:use-module (gnu packages linux)
75be6b7c 28 #:use-module (gnu packages pkg-config))
3b48f78c
NK
29
30(define-public libusb
31 (package
32 (name "libusb")
034e0d50 33 (version "1.0.19")
3b48f78c
NK
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append "mirror://sourceforge/libusb/libusb-1.0/"
38 "libusb-" version "/libusb-" version ".tar.bz2"))
39 (sha256
40 (base32
034e0d50 41 "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c"))))
3b48f78c 42 (build-system gnu-build-system)
034e0d50
LC
43
44 ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on
45 ;; libusb.
46 (arguments `(#:configure-flags '("--disable-udev")))
47 ;; (inputs `(("eudev" ,eudev)))
48
3b48f78c 49 (home-page "http://www.libusb.org")
35b9e423 50 (synopsis "User-space USB library")
3b48f78c
NK
51 (description
52 "Libusb is a library that gives applications easy access to USB
53devices on various operating systems.")
75be6b7c
AE
54 (license lgpl2.1+)))
55
56(define-public libmtp
57 (package
58 (name "libmtp")
59 (version "1.1.8")
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "mirror://sourceforge/libmtp/" version
63 "/libmtp-" version ".tar.gz"))
64 (sha256
65 (base32
66 "10i2vnj8r6hyd61xgyhmxbsissq971g50fhm1h6mc3m4d99qg7iz"))))
67 (build-system gnu-build-system)
68 (native-inputs
69 `(("pkg-config" ,pkg-config)))
cff77d48
SB
70 (propagated-inputs
71 ;; libmtp.pc refers to all these.
75be6b7c
AE
72 `(("libgcrypt" ,libgcrypt)
73 ("libusb" ,libusb)))
74 (arguments
75 `(#:configure-flags
76 (list (string-append "--with-udev="
77 (assoc-ref %outputs "out")
78 "/lib/udev"))))
79 (home-page "http://libmtp.sourceforge.net/")
80 (synopsis "Library implementing the Media Transfer Protocol")
81 (description "Libmtp implements an MTP (Media Transfer Protocol)
82initiator, which means that it initiates MTP sessions with devices. The
83devices responding are known as MTP responders. Libmtp runs on devices
84with a USB host controller interface. It implements MTP Basic, which was
85proposed for standardization.")
86 ;; COPYING contains lgpl2.1, while files headers give
87 ;; "GNU Lesser General Public License as published by the Free Software
88 ;; Foundation; either version 2 of the License, or (at your option) any
89 ;; later version."
90 (license lgpl2.1+)))