From patchwork Wed Feb 16 07:22:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 37285 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 969A627BBEB; Wed, 16 Feb 2022 07:42:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 08A1F27BBEA for ; Wed, 16 Feb 2022 07:42:38 +0000 (GMT) Received: from localhost ([::1]:42146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKExR-0003YP-0P for patchwork@mira.cbaines.net; Wed, 16 Feb 2022 02:42:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKEeU-0002X3-M1 for guix-patches@gnu.org; Wed, 16 Feb 2022 02:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKEeU-0000f7-BU for guix-patches@gnu.org; Wed, 16 Feb 2022 02:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKEeU-0003nq-2B for guix-patches@gnu.org; Wed, 16 Feb 2022 02:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53953] [PATCH v3] gnu: Add acpilight. References: <20220212104432.22611-1-brice@waegenei.re> In-Reply-To: <20220212104432.22611-1-brice@waegenei.re> Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Feb 2022 07:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53953 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: maximedevos@telenet.be Cc: 53953@debbugs.gnu.org Received: via spool by 53953-submit@debbugs.gnu.org id=B53953.164499617214603 (code B ref 53953); Wed, 16 Feb 2022 07:23:02 +0000 Received: (at 53953) by debbugs.gnu.org; 16 Feb 2022 07:22:52 +0000 Received: from localhost ([127.0.0.1]:47215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKEeK-0003nS-8W for submit@debbugs.gnu.org; Wed, 16 Feb 2022 02:22:52 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKEeC-0003n8-E6 for 53953@debbugs.gnu.org; Wed, 16 Feb 2022 02:22:50 -0500 Received: (Authenticated sender: brice@waegenei.re) by mail.gandi.net (Postfix) with ESMTPSA id 18B4124000A; Wed, 16 Feb 2022 07:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waegenei.re; s=gm1; t=1644996157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dgvb6YVrhsGaELk8W6v9jglX/1kBr8a20bZrVqyT/xc=; b=pOUA6dpsaG791mskyCd0cGSVJG8S2FNZs5AAwO12sCT6JCiZVsw5607m9q4KGatrjsdq6E fb4LP82ISaRifc5lCTP9iEiuVm/jorPP7EkVA62pr6pK7py5dmeL2Tp9qn/LG5HjeltPRV t9Ngxh1K26ubW6wz9OplUms55gncsuUQv5w5qdh6nwTPpMDjWgui4WdGakovXDj0af/n+P DNvZI45N4IB4GndV4AhbbLL3QFyBudBzuY3RfphjLSFX78ecMv77ApngJ38y6mlTLz5UiH zFHMrPcnRvJyqoPTnLt2rPm98nJ99bEb7HTzkjoLM4NvW8xOWkbIErqteLS99A== From: Brice Waegeneire Date: Wed, 16 Feb 2022 08:22:32 +0100 Message-Id: <20220216072232.23819-1-brice@waegenei.re> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (acpilight): New variable. --- Hello Maxime, Maxime Devos writes: > Brice Waegeneire schreef op za 12-02-2022 om 18:21 [+0100]: >> As for the odd make-flags, this is because of the uncanonical Makefile¹ of >> acpilight, It don't build with an empty DESTDIR. >> >> ¹ https://gitlab.com/wavexx/acpilight/-/blob/master/Makefile > > Looks like the problem is caused by 'sysconfdir' not being based > on 'prefix', but that can be resolved by > > #~(list (string-append "prefix=" #$output) > (string-append "sysconfdir=" (string-append #$output "/etc"))) > > which is not 100% canonical, but it does seems closer to me? I remember trying someting like that unsuccesfully before sending the previous patch version but I probablly missend something because it actually work! > Also, apparently there's a 'python-minimal' package, so you could use > that instead of 'python' to reduce the closure? Might be counter- > productive though, since most packages seem to use plain 'python' > instead ... Done. Cheers, - Brice gnu/packages/linux.scm | 44 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) base-commit: 52269e27c628d34af896e95347870b1755cb3e5f diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 4edb5bf858..fd68901391 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -35,7 +35,7 @@ ;;; Copyright © 2019 Tim Gesthuizen ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović -;;; Copyright © 2019, 2020, 2021 Brice Waegeneire +;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau ;;; Copyright © 2020, 2021 Oleg Pykhalov ;;; Copyright © 2020 Pierre Neidhardt @@ -8806,3 +8806,45 @@ (define-public libgpiod (license (list license:lgpl2.1+ ;; libgpiod license:gpl2+ ;; gpio-tools license:lgpl3+)))) ;; C++ bindings + +(define-public acpilight + (package + (name "acpilight") + (version "1.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/wavexx/acpilight.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; no tests + #:make-flags + #~(list (string-append "prefix=" #$output) + (string-append "sysconfdir=" #$output "/etc")) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + ;; Prevent reloading udev at build time + (substitute* "Makefile" + (("udevadm") "true")) + (substitute* "90-backlight.rules" + (("/bin") + (string-append (assoc-ref inputs "coreutils-minimal") + "/bin")))))))) + (inputs + (list coreutils-minimal + python-minimal)) + (home-page "https://gitlab.com/wavexx/acpilight") + (synopsis "Backward-compatibile xbacklight replacement") + (description "acpilight is a backward-compatibile replacement for +xbacklight that uses the ACPI interface to set the display +brightness. On modern laptops acpilight can control both display and +keyboard backlight uniformly on either X11, the console or Wayland.") + (license license:gpl3+)))