--

José Miguel Sánchez García

From 39adc264a5f2df4ebeaad7879d7005f0831841c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 <jm...@openmailbox.org>
Date: Sat, 28 Jan 2017 13:07:57 +0100
Subject: [PATCH] gnu: Add light.

* gnu/packages/light.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add light.scm.
---
 gnu/local.mk           |  1 +
 gnu/packages/light.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 gnu/packages/light.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 59fc1a82c..da7064569 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -225,6 +225,7 @@ GNU_SYSTEM_MODULES =                                \
   %D%/packages/libusb.scm                      \
   %D%/packages/libunwind.scm                   \
   %D%/packages/libupnp.scm                     \
+  %D%/packages/light.scm                     \
   %D%/packages/lighting.scm                     \
   %D%/packages/links.scm                       \
   %D%/packages/linux.scm                       \
diff --git a/gnu/packages/light.scm b/gnu/packages/light.scm
new file mode 100644
index 000000000..4db886588
--- /dev/null
+++ b/gnu/packages/light.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 José Miguel Sánchez García <jm...@openmailbox.com>
+;;;
+;;; 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 light)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages man))
+
+(define-public light
+  (package
+   (name "light")
+   (version "1.0")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "https://github.com/haikarainen/"; name
+                                "/archive/v" version ".tar.gz"))
+            (sha256
+             (base32
+              "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
+            (file-name (string-append name "-" version "-checkout"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:tests? #f ; no tests
+      #:make-flags (list "CC=gcc"
+                         (string-append "PREFIX=" %output))
+      #:phases
+      (modify-phases %standard-phases
+                     (delete 'configure)
+                     (add-after 'unpack 'patch-makefile
+                                (lambda _
+                                  (substitute* "Makefile" (("chown") "#")))))))
+   (native-inputs
+    `(("help2man" ,help2man)))
+   (home-page "https://haikarainen.github.io/light";)
+   (synopsis "GNU/Linux application to control backlights")
+   (description
+    "light is a program to control backlight controllers under GNU/Linux.
+It's the successor of lightscript, which was a bash script with the same
+purpose, and tries to maintain the same functionality.")
+   (license license:gpl3)))
-- 
2.11.0

Reply via email to