Commit | Line | Data |
---|---|---|
e7682771 | 1 | ;;; GNU Guix --- Functional package management for GNU |
a88825d9 | 2 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> |
e7682771 AK |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages lirc) | |
20 | #:use-module (guix packages) | |
21 | #:use-module (guix download) | |
22 | #:use-module (guix build-system gnu) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (gnu packages) | |
25 | #:use-module (gnu packages pkg-config) | |
a88825d9 | 26 | #:use-module (gnu packages libusb) |
e7682771 | 27 | #:use-module (gnu packages linux) |
678932aa | 28 | #:use-module (gnu packages xml) |
e7682771 AK |
29 | #:use-module (gnu packages xorg) |
30 | #:use-module (gnu packages python)) | |
31 | ||
32 | (define-public lirc | |
33 | (package | |
34 | (name "lirc") | |
a88825d9 | 35 | (version "0.9.4") |
e7682771 AK |
36 | (source (origin |
37 | (method url-fetch) | |
38 | (uri (string-append "mirror://sourceforge/lirc/lirc-" | |
39 | version ".tar.bz2")) | |
40 | (sha256 | |
41 | (base32 | |
a88825d9 | 42 | "1l2xzhnm4hrla51ik09hcafki0y8wnww7svfm7j63zbl2rssc66x")) |
fc1adab1 | 43 | (patches (search-patches "lirc-localstatedir.patch")))) |
e7682771 AK |
44 | (build-system gnu-build-system) |
45 | (arguments | |
a88825d9 AK |
46 | '(#:configure-flags '("--localstatedir=/var") |
47 | #:phases | |
48 | (modify-phases %standard-phases | |
49 | (add-after 'unpack 'patch-lirc-make-devinput | |
50 | (lambda* (#:key inputs #:allow-other-keys) | |
51 | ;; 'lirc-make-devinput' script assumes that linux headers | |
52 | ;; are placed in "/usr/...". | |
53 | (let ((headers (assoc-ref inputs "linux-headers"))) | |
54 | (substitute* "tools/lirc-make-devinput" | |
55 | (("/usr/include") (string-append headers "/include")))) | |
56 | #t)) | |
57 | (add-after 'unpack 'patch-doc/Makefile.in | |
58 | (lambda _ | |
59 | ;; Lirc wants to install several images and a useless html page | |
60 | ;; to "$(localstatedir)/lib/lirc/". This makes 'install' phase | |
61 | ;; fail as localstatedir is "/var", so do not install these | |
62 | ;; files there (the same images are installed in | |
63 | ;; "share/doc/lirc/images/" anyway). | |
64 | (substitute* "doc/Makefile.in" | |
65 | (("^vardocs_DATA =.*") "vardocs_DATA =\n") | |
66 | (("^varimage_DATA =.*") "varimage_DATA =\n")) | |
67 | #t))))) | |
e7682771 | 68 | (native-inputs |
678932aa AK |
69 | `(("pkg-config" ,pkg-config) |
70 | ("libxslt" ,libxslt))) | |
e7682771 AK |
71 | (inputs |
72 | `(("libx11" ,libx11) | |
a88825d9 AK |
73 | ("libusb-compat" ,libusb-compat) |
74 | ("linux-headers" ,linux-libre-headers) | |
e7682771 AK |
75 | ("alsa-lib" ,alsa-lib) |
76 | ("python" ,python))) | |
77 | (home-page "http://www.lirc.org/") | |
78 | (synopsis "Linux Infrared Remote Control") | |
79 | (description | |
80 | "LIRC allows computers to send and receive IR signals of many commonly | |
81 | used remote controls. The most important part of LIRC is the 'lircd' daemon | |
82 | that decodes IR signals received by the device drivers. The second daemon | |
83 | program 'lircmd' allows to translate IR signals to mouse movements. The | |
84 | user space applications allow you to control your computer with a remote | |
85 | control: you can send X events to applications, start programs and much more | |
86 | on just one button press.") | |
87 | (license license:gpl2+))) |