unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1.
@ 2024-08-02  8:30 Evgeny Pisemsky
  2024-08-08  7:08 ` [bug#72416] Improved patch with udev rules and described changes Evgeny Pisemsky
  2024-08-09 10:54 ` [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky
  0 siblings, 2 replies; 4+ messages in thread
From: Evgeny Pisemsky @ 2024-08-02  8:30 UTC (permalink / raw)
  To: 72416

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-usbrelay-Update-to-1.2.1.patch --]
[-- Type: text/x-patch, Size: 3029 bytes --]

From 523d0096745e8e649b966101f528b402ec06fc48 Mon Sep 17 00:00:00 2001
Message-ID: <523d0096745e8e649b966101f528b402ec06fc48.1722586951.git.mail@pisemsky.site>
From: Evgeny Pisemsky <mail@pisemsky.site>
Date: Fri, 2 Aug 2024 11:00:11 +0300
Subject: [PATCH] gnu: usbrelay: Update to 1.2.1.

* gnu/packages/hardware.scm (usbrelay): Update to 1.2.1.

Change-Id: I5b889889c528d5526c8cfcc66d56b2b9d8d60437
---
 gnu/packages/hardware.scm | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 468e2adc3b..349b928713 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1580,28 +1580,36 @@ (define-public lxi-tools
 (define-public usbrelay
   (package
     (name "usbrelay")
-    (version "1.2")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/darrylb123/usbrelay")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0fr3wglr2c6myg4k6ai2p5z38prclcnk2ngik15sq16fnp6qg750"))))
+    (version "1.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/darrylb123/usbrelay")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1xw2fqx4drmkvv587vkz3aicp6pw1mzxr8bjz8wad9j4c0r24cgn"))))
     (build-system gnu-build-system)
     (arguments
      (list
       #:phases #~(modify-phases %standard-phases
-                   (delete 'configure)) ;no configure script
-      #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
-                           (string-append "PREFIX=" #$output)
+                   ;; No configure script.
+                   (delete 'configure)
+                   (add-after 'install 'install-manpage
+                     (lambda _
+                       (install-file "usbrelay.1"
+                                     (string-append #$output "/share/man/man1")))))
+      #:make-flags #~(list (string-append "PREFIX=" #$output)
+                           (string-append "CC=" #$(cc-for-target))
                            (string-append "LDFLAGS=-Wl,-rpath="
                                           (string-append #$output "/lib"))
                            "LDCONFIG=true"
-                           "USBMAJOR=$(USBLIBVER)")
-      #:tests? #f))                     ;no test suite
+                           (string-append "USBMAJOR=" #$version)
+                           (string-append "USBLIBVER=" #$version)
+                           (string-append "VERSION=" #$version))
+      ;; No test suite.
+      #:tests? #f))
     (inputs (list hidapi))
     (home-page "https://github.com/darrylb123/usbrelay")
     (synopsis "Control USB relay modules")

base-commit: b20956651a53a8f23828fdeb6945e1a31e6997a8
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#72416] Improved patch with udev rules and described changes
  2024-08-02  8:30 [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky
@ 2024-08-08  7:08 ` Evgeny Pisemsky
  2024-08-14 10:10   ` bug#72416: " Christopher Baines
  2024-08-09 10:54 ` [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky
  1 sibling, 1 reply; 4+ messages in thread
From: Evgeny Pisemsky @ 2024-08-08  7:08 UTC (permalink / raw)
  To: 72416

[-- Attachment #1: 0001-gnu-usbrelay-Update-to-1.2.1.patch --]
[-- Type: text/x-patch, Size: 3842 bytes --]

From 32639b4f86ffd3b9120bd0882ca4532280e6579e Mon Sep 17 00:00:00 2001
Message-ID: <32639b4f86ffd3b9120bd0882ca4532280e6579e.1723021106.git.mail@pisemsky.site>
From: Evgeny Pisemsky <mail@pisemsky.site>
Date: Wed, 7 Aug 2024 11:55:11 +0300
Subject: [PATCH] gnu: usbrelay: Update to 1.2.1.

* gnu/packages/hardware.scm (usbrelay): Update to 1.2.1.
[arguments]: Install manpage and udev rules, specify actual version.

Change-Id: I5b889889c528d5526c8cfcc66d56b2b9d8d60437
---
 gnu/packages/hardware.scm | 40 +++++++++++++++++++++++++--------------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 9db7de848e..08cf424e48 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
-;;; Copyright © 2021, 2023 Evgeny Pisemsky <mail@pisemsky.site>
+;;; Copyright © 2021, 2023, 2024 Evgeny Pisemsky <mail@pisemsky.site>
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 Denis Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com>
@@ -1580,28 +1580,40 @@ (define-public lxi-tools
 (define-public usbrelay
   (package
     (name "usbrelay")
-    (version "1.2")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/darrylb123/usbrelay")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0fr3wglr2c6myg4k6ai2p5z38prclcnk2ngik15sq16fnp6qg750"))))
+    (version "1.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/darrylb123/usbrelay")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1xw2fqx4drmkvv587vkz3aicp6pw1mzxr8bjz8wad9j4c0r24cgn"))))
     (build-system gnu-build-system)
     (arguments
      (list
       #:phases #~(modify-phases %standard-phases
-                   (delete 'configure)) ;no configure script
+                   ;; No configure script.
+                   (delete 'configure)
+                   (add-after 'install 'install-manpage
+                     (lambda _
+                       (install-file "usbrelay.1"
+                                     (string-append #$output "/share/man/man1"))))
+                   (add-after 'install-manpage 'install-udev-rules
+                     (lambda _
+                       (install-file "50-usbrelay.rules"
+                                     (string-append #$output "/lib/udev/rules.d")))))
       #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
                            (string-append "PREFIX=" #$output)
                            (string-append "LDFLAGS=-Wl,-rpath="
                                           (string-append #$output "/lib"))
                            "LDCONFIG=true"
-                           "USBMAJOR=$(USBLIBVER)")
-      #:tests? #f))                     ;no test suite
+                           (string-append "USBMAJOR=" #$version)
+                           (string-append "USBLIBVER=" #$version)
+                           (string-append "VERSION=" #$version))
+      ;; No test suite.
+      #:tests? #f))
     (inputs (list hidapi))
     (home-page "https://github.com/darrylb123/usbrelay")
     (synopsis "Control USB relay modules")

base-commit: 5e567587dd4abf51f9a6fa44f5a852dde1115ce9
-- 
2.45.2





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1.
  2024-08-02  8:30 [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky
  2024-08-08  7:08 ` [bug#72416] Improved patch with udev rules and described changes Evgeny Pisemsky
@ 2024-08-09 10:54 ` Evgeny Pisemsky
  1 sibling, 0 replies; 4+ messages in thread
From: Evgeny Pisemsky @ 2024-08-09 10:54 UTC (permalink / raw)
  To: 72416

I successfully tested the patch with a real relay, including udev rules.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72416: Improved patch with udev rules and described changes
  2024-08-08  7:08 ` [bug#72416] Improved patch with udev rules and described changes Evgeny Pisemsky
@ 2024-08-14 10:10   ` Christopher Baines
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2024-08-14 10:10 UTC (permalink / raw)
  To: Evgeny Pisemsky; +Cc: 72416-done

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

Evgeny Pisemsky <mail@pisemsky.site> writes:

> From 32639b4f86ffd3b9120bd0882ca4532280e6579e Mon Sep 17 00:00:00 2001
> Message-ID: <32639b4f86ffd3b9120bd0882ca4532280e6579e.1723021106.git.mail@pisemsky.site>
> From: Evgeny Pisemsky <mail@pisemsky.site>
> Date: Wed, 7 Aug 2024 11:55:11 +0300
> Subject: [PATCH] gnu: usbrelay: Update to 1.2.1.
>
> * gnu/packages/hardware.scm (usbrelay): Update to 1.2.1.
> [arguments]: Install manpage and udev rules, specify actual version.
>
> Change-Id: I5b889889c528d5526c8cfcc66d56b2b9d8d60437
> ---
>  gnu/packages/hardware.scm | 40 +++++++++++++++++++++++++--------------
>  1 file changed, 26 insertions(+), 14 deletions(-)

Thanks for the patch, I tweaked the indentation to make the diff clearer
and pushed this to master as ff185dc00319af1dede83df465288e73dc0e5ff5.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-14 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02  8:30 [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky
2024-08-08  7:08 ` [bug#72416] Improved patch with udev rules and described changes Evgeny Pisemsky
2024-08-14 10:10   ` bug#72416: " Christopher Baines
2024-08-09 10:54 ` [bug#72416] [PATCH] gnu: usbrelay: Update to 1.2.1 Evgeny Pisemsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).