| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages lirc)
|
| 23 | #:use-module (guix gexp)
|
| 24 | #:use-module (guix packages)
|
| 25 | #:use-module (guix download)
|
| 26 | #:use-module (guix git-download)
|
| 27 | #:use-module (guix build-system gnu)
|
| 28 | #:use-module ((guix licenses) #:prefix license:)
|
| 29 | #:use-module (gnu packages)
|
| 30 | #:use-module (gnu packages pkg-config)
|
| 31 | #:use-module (gnu packages libusb)
|
| 32 | #:use-module (gnu packages linux)
|
| 33 | #:use-module (gnu packages xml)
|
| 34 | #:use-module (gnu packages xorg)
|
| 35 | #:use-module (gnu packages python)
|
| 36 | #:use-module (gnu packages python-build)
|
| 37 | #:use-module (gnu packages python-xyz))
|
| 38 |
|
| 39 | (define-public lirc
|
| 40 | (package
|
| 41 | (name "lirc")
|
| 42 | (version "0.10.2")
|
| 43 | (source (origin
|
| 44 | (method url-fetch)
|
| 45 | (uri (string-append "mirror://sourceforge/lirc/LIRC/" version
|
| 46 | "/lirc-" version ".tar.bz2"))
|
| 47 | (sha256
|
| 48 | (base32
|
| 49 | "0ai27l6hxfgkwvkqa3fy1b1gqzw2y10md030y5ig4748fj1fqi1x"))
|
| 50 | (patches (search-patches "lirc-localstatedir.patch"
|
| 51 | "lirc-reproducible-build.patch"))))
|
| 52 | (build-system gnu-build-system)
|
| 53 | (arguments
|
| 54 | (list
|
| 55 | #:configure-flags
|
| 56 | #~(list "--localstatedir=/var"
|
| 57 | |
| 58 | |
| 59 | |
| 60 | "--enable-devinput")
|
| 61 | #:phases
|
| 62 | #~(modify-phases %standard-phases
|
| 63 | (add-after 'unpack 'disable-kernel-sniffing
|
| 64 | (lambda _
|
| 65 | |
| 66 | |
| 67 | (substitute* "configure"
|
| 68 | (("kernelversion=.*")
|
| 69 | "kernelversion=irrelevant\n"))))
|
| 70 | (add-after 'unpack 'patch-lirc-make-devinput
|
| 71 | (lambda* (#:key inputs #:allow-other-keys)
|
| 72 | |
| 73 | |
| 74 | (let ((headers (assoc-ref inputs "kernel-headers")))
|
| 75 | (substitute* "tools/lirc-make-devinput"
|
| 76 | (("/usr/include")
|
| 77 | (string-append headers "/include"))))))
|
| 78 | (add-after 'unpack 'fix-gcc14-build
|
| 79 | (lambda _
|
| 80 | |
| 81 | (substitute* "plugins/default.c"
|
| 82 | (("#include <sys/types.h>" all)
|
| 83 | (string-append all "\n#include <sys/sysmacros.h>")))))
|
| 84 | (add-after 'unpack 'patch-doc/Makefile.in
|
| 85 | (lambda _
|
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | (substitute* "doc/Makefile.in"
|
| 92 | (("^vardocs_DATA =.*")
|
| 93 | "vardocs_DATA =\n")
|
| 94 | (("^varimage_DATA =.*")
|
| 95 | "varimage_DATA =\n"))))
|
| 96 | (add-after 'unpack 'omit-pip-sourceball
|
| 97 | |
| 98 | |
| 99 | |
| 100 | (lambda _
|
| 101 | (substitute* "Makefile.in"
|
| 102 | (("(PYTHON_TARBALL.*=).*" _ tarball=)
|
| 103 | (string-append tarball= "\n")))))
|
| 104 | (add-before 'configure 'build-reproducibly
|
| 105 | (lambda _
|
| 106 | (setenv "LIRC_IRDB_CACHE_ID" "build time"))))))
|
| 107 | (native-inputs
|
| 108 | (list libxslt
|
| 109 | pkg-config
|
| 110 | python-setuptools))
|
| 111 | (inputs
|
| 112 | (list libx11
|
| 113 | libusb-compat
|
| 114 | alsa-lib
|
| 115 | python))
|
| 116 | (home-page "https://www.lirc.org/")
|
| 117 | (synopsis "Linux Infrared Remote Control")
|
| 118 | (description
|
| 119 | "LIRC allows computers to send and receive IR signals of many commonly
|
| 120 | used remote controls. The most important part of LIRC is the @code{lircd}
|
| 121 | daemon that decodes IR signals received by the device drivers. The second
|
| 122 | daemon program @code{lircmd} translates IR signals to mouse movements.
|
| 123 | The user space applications allow you to control your computer with a remote
|
| 124 | control: you can send X events to applications, start programs and much more
|
| 125 | on just one button press.")
|
| 126 | (license license:gpl2+)))
|