projects/guix·blob java-team · refs

169 lines · 6.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2016 Mark H Weaver <[email protected]>
4;;; Copyright © 2017, 2019 Efraim Flashner <[email protected]>
5;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2019, 2021 Leo Famulari <[email protected]>
7;;; Copyright © 2020 Vincent Legoll <[email protected]>
8;;; Copyright © 2026 Ian Eure <[email protected]>
9;;; Copyright © 2026 Ashish SHUKLA <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages rsync)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages acl)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages digest)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages popt)
35 #:use-module (gnu packages tls)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix gexp)
40 #:use-module (guix git-download)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix utils))
44
45(define-public rsync
46 (package
47 (name "rsync")
48 (version "3.5.0")
49 (source (origin
50 (method url-fetch)
51 (uri (string-append "https://rsync.samba.org/ftp/rsync/src/rsync-"
52 version ".tar.gz"))
53 (sha256
54 (base32
55 "0cqddrjp5mlkdyqrj8wpdgpd3jprnw0cniqycq7m969ycppx3zy7"))))
56 (build-system gnu-build-system)
57 (arguments
58 `(#:configure-flags
59 ;; The bundled copies are preferred by default.
60 (list "--without-included-zlib"
61 "--without-included-popt")
62 #:make-flags
63 ,#~(list (string-append "CC=" #$(cc-for-target)))
64 #:phases
65 ,#~(modify-phases %standard-phases
66 (add-after 'unpack 'patch-testsuite
67 (lambda _
68 (let ((sh-file (which "sh"))
69 (python-file (which "python3"))
70 (bash-file (which "bash"))
71 (cc (string-append "'"
72 #$(cc-for-target)
73 "'")))
74 (substitute* (find-files "testsuite/" "\\.py$")
75 (("'cc'") cc)
76 (("/usr/bin/env python3") python-file)
77 (("/usr/bin/env bash") bash-file)
78 (("/bin/sh") sh-file))))))))
79 (native-inputs
80 (list perl python-minimal)) ;needed for tests
81 (inputs
82 (list acl
83 lz4
84 openssl
85 popt
86 xxhash
87 zlib
88 `(,zstd "lib")))
89 (synopsis "Remote (and local) file copying tool")
90 (description
91 "Rsync is a fast and versatile file copying tool. It can copy locally,
92to/from another host over any remote shell, or to/from a remote rsync daemon.
93Its delta-transfer algorithm reduces the amount of data sent over the network
94by sending only the differences between the source files and the existing
95files in the destination.")
96 (license license:gpl3+)
97 (home-page "https://rsync.samba.org/")))
98
99(define-public librsync
100 (package
101 (name "librsync")
102 (version "2.3.4")
103 (source (origin
104 (method git-fetch)
105 (uri (git-reference
106 (url "https://github.com/librsync/librsync")
107 (commit (string-append "v" version))))
108 (file-name (git-file-name name version))
109 (sha256
110 (base32
111 "07yd45r9fkgw55m47xh2aqgflagzw5kh2w764w5gv1jfrg5rn8vy"))))
112 (build-system cmake-build-system)
113 (inputs
114 (list popt))
115 (native-inputs
116 (list which perl))
117 (home-page "https://librsync.sourceforge.net/")
118 (synopsis "Implementation of the rsync remote-delta algorithm")
119 (description
120 "Librsync is a free software library that implements the rsync
121remote-delta algorithm. This algorithm allows efficient remote updates of a
122file, without requiring the old and new versions to both be present at the
123sending end. The library uses a \"streaming\" design similar to that of zlib
124with the aim of allowing it to be embedded into many different applications.")
125 (license license:lgpl2.1+)))
126
127(define-public openrsync
128 (let ((base-version "0.5.0")
129 (revision "0")
130 (commit "a257c0f495af2b5ee6b41efc6724850a445f87ed"))
131 (package
132 (name "openrsync")
133 (version (git-version base-version revision commit))
134 (source
135 (origin
136 (method git-fetch)
137 (uri (git-reference
138 (url "https://github.com/kristapsdz/openrsync/")
139 (commit commit)))
140 (file-name (git-file-name name version))
141 (sha256
142 (base32 "1jfz10psi1qw842hwip7p01sgd4ns9n53amdshzqy5brqyinbkd5"))))
143 (build-system gnu-build-system)
144 (arguments
145 (list
146 #:tests? #f ;No tests.
147 #:phases
148 #~(modify-phases %standard-phases
149 (add-after 'unpack 'patch-hurd
150 (lambda _
151 (substitute* "configure"
152 (("defined\\(__linux__\\)" all)
153 (string-append all "|| defined(__GNU__)")))))
154 (replace 'configure
155 ;; openrsync has a non-autotools ./configure script which
156 ;; errors under the gnu-build-system's 'configure phase.
157 (lambda _
158 (setenv "DESTDIR" #$output)
159 (setenv "PREFIX" "")
160 (setenv "CFLAGS" "-O2")
161 (setenv "CC" #$(cc-for-target))
162 (invoke "./configure" "PREFIX=\"\""))))))
163 (synopsis "OpenBSD implementation of @command{rsync}")
164 (description
165 "Openrsync is an alternate implementation of @command{rsync},
166originally written for OpenBSD and ported to Linux and other Unix-like
167systems. It supports a subset of @command{rsync}'s options.")
168 (license license:isc)
169 (home-page "https://github.com/kristapsdz/openrsync"))))