| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
| 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. |
| 6 | ;;; |
| 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 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 | ;;; |
| 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 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 |
| 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | (define-module (gnu packages libusb) |
| 21 | #:use-module (gnu packages) |
| 22 | #:use-module (guix licenses) |
| 23 | #:use-module (guix packages) |
| 24 | #:use-module (guix download) |
| 25 | #:use-module (guix build-system gnu) |
| 26 | #:use-module (gnu packages gnupg) |
| 27 | #:use-module (gnu packages linux) |
| 28 | #:use-module (gnu packages pkg-config)) |
| 29 | |
| 30 | (define-public libusb |
| 31 | (package |
| 32 | (name "libusb") |
| 33 | (version "1.0.19") |
| 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 |
| 41 | "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c")))) |
| 42 | (build-system gnu-build-system) |
| 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 | |
| 49 | (home-page "http://www.libusb.org") |
| 50 | (synopsis "User-space USB library") |
| 51 | (description |
| 52 | "Libusb is a library that gives applications easy access to USB |
| 53 | devices on various operating systems.") |
| 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))) |
| 70 | (propagated-inputs |
| 71 | ;; libmtp.pc refers to all these. |
| 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) |
| 82 | initiator, which means that it initiates MTP sessions with devices. The |
| 83 | devices responding are known as MTP responders. Libmtp runs on devices |
| 84 | with a USB host controller interface. It implements MTP Basic, which was |
| 85 | proposed 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+))) |