guix-devel/gnu/packages/lirc.scm

151 lines
6.1 KiB
Scheme
Raw Normal View History

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lirc)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages python))
(define-public lirc
(package
(name "lirc")
(version "0.10.1")
(source (origin
(method url-fetch)
gnu: Update URLs for sourceforge.net. * gnu/packages/admin.scm: Update URLs pointing to sourceforge.net. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/boost.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/code.scm: Likewise. * gnu/packages/compression.scm: Likewise. * gnu/packages/cups.scm: Likewise. * gnu/packages/djvu.scm: Likewise. * gnu/packages/docbook.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fonts.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/gl.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/graphviz.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/onc-rpc.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/photo.scm: Likewise. * gnu/packages/popt.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/rdesktop.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/swig.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xml.scm: Likewise.
2016-07-21 08:35:30 +02:00
(uri (string-append "mirror://sourceforge/lirc/LIRC/" version
"/lirc-" version ".tar.bz2"))
(sha256
(base32
"1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb"))
gnu: packages: Use 'search-patches' everywhere. * gnu/packages/abiword.scm: Use 'search-patches' for 'patches' field. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/algebra.scm: Likewise. * gnu/packages/animation.scm: Likewise. * gnu/packages/apr.scm: Likewise. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/autotools.scm: Likewise. * gnu/packages/avahi.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bash.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/ci.scm: Likewise. * gnu/packages/cmake.scm: Likewise. * gnu/packages/cpio.scm: Likewise. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/dico.scm: Likewise. * gnu/packages/doxygen.scm: Likewise. * gnu/packages/ebook.scm: Likewise. * gnu/packages/elf.scm: Likewise. * gnu/packages/emacs.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/ftp.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gawk.scm: Likewise. * gnu/packages/gcc.scm: Likewise. * gnu/packages/gd.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/gnunet.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/gnuzilla.scm: Likewise. * gnu/packages/graphics.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/icu4c.scm: Likewise. * gnu/packages/idutils.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/imagemagick.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/ldc.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libevent.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libunwind.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/llvm.scm: Likewise. * gnu/packages/lsh.scm: Likewise. * gnu/packages/lua.scm: Likewise. * gnu/packages/lxqt.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/mit-krb5.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/multiprecision.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/ninja.scm: Likewise. * gnu/packages/nvi.scm: Likewise. * gnu/packages/ocaml.scm: Likewise. * gnu/packages/orpheus.scm: Likewise. * gnu/packages/ots.scm: Likewise. * gnu/packages/parallel.scm: Likewise. * gnu/packages/patchutils.scm: Likewise. * gnu/packages/pcre.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/plotutils.scm: Likewise. * gnu/packages/polkit.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/qemu.scm: Likewise. * gnu/packages/qt.scm: Likewise. * gnu/packages/ratpoison.scm: Likewise. * gnu/packages/rdf.scm: Likewise. * gnu/packages/readline.scm: Likewise. * gnu/packages/rush.scm: Likewise. * gnu/packages/scheme.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/sdl.scm: Likewise. * gnu/packages/slim.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/tcsh.scm: Likewise. * gnu/packages/texinfo.scm: Likewise. * gnu/packages/tls.scm: Likewise. * gnu/packages/tor.scm: Likewise. * gnu/packages/tv.scm: Likewise. * gnu/packages/valgrind.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/vtk.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xfce.scm: Likewise. * gnu/packages/xiph.scm: Likewise. * gnu/packages/xml.scm: Likewise. * gnu/packages/xorg.scm: Likewise. * gnu/packages/zip.scm: Likewise.
2016-04-08 14:18:13 +02:00
(patches (search-patches "lirc-localstatedir.patch"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
'("--localstatedir=/var"
;; "configure" script fails to enable "devinput" driver as it
;; checks for "/dev/input" directory (which is not available),
;; so enable it explicitly.
"--enable-devinput")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-kernel-sniffing
(lambda _
;; Correct the faulty assumption that systemd support should be
;; hard-wired when a build host's /proc/version contains "Ubuntu".
(substitute* "configure"
(("kernelversion=.*") "kernelversion=irrelevant\n"))
#t))
(add-after 'unpack 'patch-lirc-make-devinput
(lambda* (#:key inputs #:allow-other-keys)
;; 'lirc-make-devinput' script assumes that linux headers
;; are placed in "/usr/...".
(let ((headers (assoc-ref inputs "linux-headers")))
(substitute* "tools/lirc-make-devinput"
(("/usr/include") (string-append headers "/include"))))
#t))
(add-after 'unpack 'patch-doc/Makefile.in
(lambda _
;; Lirc wants to install several images and a useless html page
;; to "$(localstatedir)/lib/lirc/". This makes 'install' phase
;; fail as localstatedir is "/var", so do not install these
;; files there (the same images are installed in
;; "share/doc/lirc/images/" anyway).
(substitute* "doc/Makefile.in"
(("^vardocs_DATA =.*") "vardocs_DATA =\n")
(("^varimage_DATA =.*") "varimage_DATA =\n"))
#t)))))
(native-inputs
`(("pkg-config" ,pkg-config)
("libxslt" ,libxslt)))
(inputs
`(("libx11" ,libx11)
("libusb-compat" ,libusb-compat)
("linux-headers" ,linux-libre-headers)
("alsa-lib" ,alsa-lib)
("python" ,python)))
(home-page "http://www.lirc.org/")
(synopsis "Linux Infrared Remote Control")
(description
"LIRC allows computers to send and receive IR signals of many commonly
used remote controls. The most important part of LIRC is the 'lircd' daemon
that decodes IR signals received by the device drivers. The second daemon
program 'lircmd' allows to translate IR signals to mouse movements. The
user space applications allow you to control your computer with a remote
control: you can send X events to applications, start programs and much more
on just one button press.")
(license license:gpl2+)))
(define-public python-lirc
(let ((commit "4091fe918f3eed2513dad008828565cace408d2f")
(revision "1"))
(package
(name "python-lirc")
(version (string-append "1.2.1-" revision "." (string-take commit 7)))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/tompreston/python-lirc.git")
(commit commit)))
(sha256
(base32
"0cm47s5pvijfs3v2k7hmpxv3mvp4n5la0ihnsczk5ym3iq166jil"))
(file-name (string-append name "-" version))))
(build-system python-build-system)
(inputs
`(("lirc" ,lirc)))
(native-inputs
`(("python-cython" ,python-cython)))
(arguments
`(#:tests? #f ; the only tests that exist are human-interactive
#:phases
(modify-phases %standard-phases
(add-before 'build 'build-from-cython-files
(lambda _
(zero? (system* "make" "py3")))))))
(home-page "https://github.com/tompreston/python-lirc")
(synopsis "Python bindings for LIRC")
(description "@code{lirc} is a Python module which provides LIRC bindings.")
(license license:gpl3)
(properties `((python2-variant . ,(delay python2-lirc)))))))
(define-public python2-lirc
(let ((base (package-with-python2 (strip-python2-variant python-lirc))))
(package
(inherit base)
(arguments
`(#:tests? #f ; the only tests that exist are human-interactive
#:phases
(modify-phases %standard-phases
(add-before 'build 'build-from-cython-files
(lambda _
(zero? (system* "make" "py2")))))))
(native-inputs
gnu: Remove python-setuptools and python2-setuptools from inputs (part 2) This patch contains the changes where removing setuptools from the inputs affected some code-lines beside. * gnu/packages/admin.scm (ansible): Remove all [inputs], [native-inputs] and [propagated-inputs] where python-setuptools or python2-setuptools are the sole entries. Remove python-setuptools and python2-setuptools listed on a line by its own from [inputs], [native-inputs] and [propagated-inputs]. * gnu/packages/backup.scm (duplicity): Likewise. * gnu/packages/bioinformatics.scm (bamm, python2-pybedtools, python2-bx-python, python2-dendropy, python-pysam, python2-pysam, clipper, crossmap, cutadapt, deeptools, grit, idr, python2-warpedlmm, pbtranscript-tofu, seqmagick): Likewise. * gnu/packages/docbook.scm (dblatex): Likewise. * gnu/packages/freedesktop.scm (python-pyxdg, python2-pyxdg): Likewise. * gnu/packages/lirc.scm (python2-lirc): Likewise. * gnu/packages/mp3.scm (eyed3): Likewise. * gnu/packages/nutrition.scm (gourmet): Likewise. * gnu/packages/openstack.scm (python-hacking, python2-hacking, python-os-testr, python2-os-testr, python-stevedore, python2-stevedore, python-tempest-lib, python2-tempest-lib, python-oslo.log, python2-oslo.log, python-keystoneclient, python2-keystoneclient): Likewise. * gnu/packages/password-utils.scm (assword): Likewise. * gnu/packages/python.scm (python-passlib, python2-passlib, python-babel, python2-babel, python-parse-type, python-pytest, python2-pytest, python-scripttest, python2-scripttest, python-testtools, python2-testtools, python-testscenarios, python2-testscenarios, python-subunit, python2-subunit, python-pbr-0.11, python-pbr, python2-pbr, python-testrepository, python2-testrepository, behave, python-wheel, python2-wheel, python-requests, python2-requests, python-jsonschema, python2-jsonschema, python-pyjwt, python2-pyjwt, python-virtualenv, python2-virtualenv, python-jinja2, python2-jinja2, python-joblib, python2-joblib, python-sphinx, python2-sphinx, python-feedgenerator, python2-feedgenerator, python-scikit-image, python2-scikit-image, python-redis, python2-redis, python2-fastlmm, python-numpydoc, python2-numpydoc, python-matplotlib, python2-matplotlib, python2-pysnptools, python-rpy2, python2-rpy2, python-pillow, python2-pillow, python-pycparser, python2-pycparser, python-cffi, python2-cffi, python-cairocffi, python2-cairocffi, python-drmaa, python2-drmaa, python-pathpy, python2-pathpy, python-simplegeneric, python2-simplegeneric, python-ipython, python2-ipython, python-apsw, python2-apsw, python-lxml, python2-lxml, python-networkx, python2-networkx, python-pyzmq, python2-pyzmq, python-mccabe, python2-mccabe, python-mccabe-0.2.1, python-flake8, python2-flake8, python-flake8-2.2.4, python-mistune, python2-mistune, python-ptyprocess, python2-ptyprocess, python-llfuse, python2-llfuse, python-webob, python2-webob, python-xlrd, python2-xlrd, python-tables, python2-tables, python-pip, python2-pip, python-libarchive-c, python2-libarchive-c, python-docopt, python2-docopt, python-pyrfc3339, python2-pyrfc3339, python-configobj, python2-configobj, python-clint, python2-clint, python-rply, python2-rply, python2-rpython, python-widgetsnbextension, python2-widgetsnbextension jupyter, python-jupyter-console, python2-jupyter-console, python-hy, python2-hy, python-urllib3, python2-urllib3, python-rsa, python2-rsa, python-tox, python2-tox, python2-hypothesis, python-paste, python2-paste, python-pastescript, python2-pastescript, python2-unicodecsv, python-pkgconfig, python2-pkgconfig, python2-rope, python-sqlparse, python2-sqlparse, python-gevent, python2-gevent, python-tabulate, python2-tabulate, python-arrow, python2-arrow, python-cleo, python2-cleo, python-fake-factory, python2-fake-factory, ptpython): Likewise. * gnu/packages/rdf.scm (python-rdflib, python2-rdflib): Likewise. * gnu/packages/terminals.scm (asciinema): Likewise. * gnu/packages/version-control.scm (git-annex-remote-hubic): Likewise. * gnu/packages/xdisorg.scm (arandr): Likewise.
2016-09-28 13:30:54 +02:00
`(("python2-cython" ,python2-cython))))))