From 6bdcd2f3f08d054f8a605fc33935c4057528cdcc Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Thu, 26 May 2022 14:37:32 -0700 Subject: gnu: Add lcsync. * gnu/packages/networking.scm (lcsync): New variable. --- gnu/packages/networking.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 25c62cadb0..741cd74df8 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -275,6 +275,55 @@ (define-public lcrq the RFC.") (license (list license:gpl2 license:gpl3)))) +(define-public lcsync + (package + (name "lcsync") + (version "0.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/librecast/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 'check 'remove-network-tests + (lambda _ + ;; these tests require networking + (delete-file "./test/0000-0027.c") + (delete-file "./test/0000-0049.c") + (delete-file "./test/0000-0074.c"))) + (replace 'check + (lambda _ + (invoke "make" "test" "CC=gcc"))) + (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 -- cgit v1.2.3