guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55682] RFC packaging for lcsync


From: Vagrant Cascadian
Subject: [bug#55682] RFC packaging for lcsync
Date: Fri, 27 May 2022 12:27:33 -0700

From c23ef5bf9248921af15e337d328b2fffb7edc996 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Thu, 26 May 2022 14:37:32 -0700
Subject: [PATCH 2/2] gnu: Add lcsync.

FIXME tests run, but all fail. test failures do not trigger build failures.
FIXME figure out how to properly:

  setcap cap_net_raw=eip bin/lcsync

* gnu/packages/networking.scm (lcsync): New variable.
---
 gnu/packages/networking.scm | 42 +++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ae780d5a05..605173faa9 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -207,6 +207,48 @@ on byte-critical systems.  It supports HTTP, HTTPS, FTP 
and FTPS
 protocols.")
     (license license:gpl2+)))
 
+(define-public lcsync
+  (package
+    (name "lcsync")
+    (version "0.0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/librestack/lcsync";)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0s038b4xg9nlzhrganzjyfvc6n6cgd6kilnpik4axp62j2n5q11q"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:parallel-tests? #f
+       #:make-flags
+       (let ((target ,(%current-target-system)))
+         (list ,(string-append "CC="
+                               (cc-for-target))
+               ;; avoid running setcap in the install process
+               "SETCAP_PROGRAM=true"
+               (string-append "prefix="
+                              (assoc-ref %outputs "out"))))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ;no configure script
+         (add-before 'build 'add-library-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((librecast (assoc-ref inputs "librecast")))
+               (substitute* (list "./src/Makefile" "./test/Makefile")
+                 (("-llibrecast") (string-append "-L" librecast
+                                                 "/lib -llibrecast")))))))))
+    (inputs (list librecast libsodium))
+    (home-page "https://librecast.net/lcsync.html";)
+    (synopsis "librecast file and data syncing tool")
+    (description
+     "lcsync is a tool to sync files over IPv6 multicast or the
+local filesystem.  It splits the file into blocks, hashes them, and compares
+them in order to efficiently transfer a minimal amount of data.")
+    (license (list license:gpl2 license:gpl3))))
+
 ;; This package does not have a release yet.
 ;; But this is required to provide a feature in PipeWire.
 (define-public libcamera
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]