Commit | Line | Data |
---|---|---|
b2e93b9e | 1 | ;;; GNU Guix --- Functional package management for GNU |
be58ffa4 | 2 | ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
7ee557a7 | 3 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
b2e93b9e EF |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
760d6066 | 20 | (define-module (gnu packages sync) |
b2e93b9e EF |
21 | #:use-module ((guix licenses) #:prefix license:) |
22 | #:use-module (guix build-system cmake) | |
23 | #:use-module (guix download) | |
24 | #:use-module (guix packages) | |
2523691a | 25 | #:use-module (gnu packages check) |
b2e93b9e EF |
26 | #:use-module (gnu packages compression) |
27 | #:use-module (gnu packages databases) | |
28 | #:use-module (gnu packages linux) | |
7ee557a7 | 29 | #:use-module (gnu packages lua) |
b2e93b9e EF |
30 | #:use-module (gnu packages perl) |
31 | #:use-module (gnu packages pkg-config) | |
b2e93b9e | 32 | #:use-module (gnu packages qt) |
b2e93b9e EF |
33 | #:use-module (gnu packages tls)) |
34 | ||
35 | (define-public owncloud-client | |
36 | (package | |
37 | (name "owncloud-client") | |
be58ffa4 | 38 | (version "2.3.1") |
b2e93b9e EF |
39 | (source |
40 | (origin | |
41 | (method url-fetch) | |
42 | (uri (string-append "https://download.owncloud.com/desktop/stable/" | |
43 | "owncloudclient-" version ".tar.xz")) | |
44 | (sha256 | |
be58ffa4 | 45 | (base32 "051rky4rpm73flxxkhfdxqq23ncnk4ixhscbg74w82sa4d93f54k")) |
5fc4df0c EF |
46 | (modules '((guix build utils))) |
47 | (snippet | |
48 | '(begin | |
49 | ;; only allows bundled libcrashreporter-qt | |
50 | (delete-file-recursively "src/3rdparty/libcrashreporter-qt") | |
51 | ;; we already package qtkeychain and sqlite | |
52 | (delete-file-recursively "src/3rdparty/qtkeychain") | |
53 | (delete-file-recursively "src/3rdparty/sqlite3") | |
54 | ;; qjson is packaged, qprogessindicator, qlockedfile, qtokenizer and | |
55 | ;; qtsingleapplication have not yet been packaged, but all are | |
56 | ;; explicitly used from the 3rdparty folder during build. | |
57 | ;; We can also remove the macgoodies folder | |
58 | (delete-file-recursively "src/3rdparty/qtmacgoodies"))))) | |
b2e93b9e EF |
59 | (build-system cmake-build-system) |
60 | (arguments | |
61 | `(#:phases | |
62 | (modify-phases %standard-phases | |
63 | (add-after 'unpack 'change-rpath-dirs | |
64 | (lambda _ | |
65 | (substitute* '("src/libsync/CMakeLists.txt" | |
66 | "csync/src/CMakeLists.txt") | |
5021f9d3 | 67 | ;; We store the libs in out/lib and not /usr/lib/appname, so we |
b2e93b9e | 68 | ;; need the executable to point to the libraries in /lib and not |
5021f9d3 | 69 | ;; in /lib/appname. |
b2e93b9e EF |
70 | (("\\/\\$\\{APPLICATION_EXECUTABLE\\}") "")) |
71 | (substitute* '("src/cmd/CMakeLists.txt" | |
72 | "src/crashreporter/CMakeLists.txt" | |
73 | "src/gui/CMakeLists.txt") | |
74 | ;; This has the same issue as the substitution above. | |
2523691a EF |
75 | (("\\/\\$\\{APPLICATION_EXECUTABLE\\}\\\"") "\"")) |
76 | #t)) | |
77 | (add-after 'unpack 'delete-failing-tests | |
be58ffa4 | 78 | ;; "Could not create autostart folder" |
2523691a EF |
79 | (lambda _ |
80 | (substitute* "test/CMakeLists.txt" | |
2523691a EF |
81 | (("owncloud_add_test\\(Utility \"\"\\)" test) |
82 | (string-append "#" test))) | |
83 | #t))) | |
84 | #:configure-flags '("-DUNIT_TESTING=ON"))) | |
85 | (native-inputs | |
86 | `(("cmocka" ,cmocka) | |
87 | ("perl" ,perl) | |
88 | ("pkg-config" ,pkg-config) | |
89 | ("qtlinguist" ,qttools))) | |
b2e93b9e EF |
90 | (inputs |
91 | `(("inotify-tools" ,inotify-tools) | |
92 | ("openssl" ,openssl) | |
2523691a | 93 | ("qtbase" ,qtbase) |
b2e93b9e | 94 | ("qtkeychain" ,qtkeychain) |
2523691a | 95 | ("qtwebkit" ,qtwebkit) |
b2e93b9e EF |
96 | ("sqlite" ,sqlite) |
97 | ("zlib" ,zlib))) | |
98 | (home-page "https://owncloud.org") | |
99 | (synopsis "Folder synchronization with an ownCloud server") | |
100 | (description "The ownCloudSync system lets you always have your latest | |
101 | files wherever you are. Just specify one or more folders on the local machine | |
102 | to and a server to synchronize to. You can configure more computers to | |
103 | synchronize to the same server and any change to the files on one computer will | |
104 | silently and reliably flow across to every other.") | |
105 | (license license:gpl2+))) | |
cf3504c6 EF |
106 | |
107 | (define-public qsyncthingtray | |
108 | (package | |
109 | (name "qsyncthingtray") | |
4b4ff693 | 110 | (version "0.5.7") |
cf3504c6 EF |
111 | (source |
112 | (origin | |
113 | (method url-fetch) | |
114 | (uri (string-append | |
115 | "https://github.com/sieren/QSyncthingTray/archive/" | |
116 | version ".tar.gz")) | |
117 | (file-name (string-append name "-" version ".tar.gz")) | |
118 | (sha256 | |
119 | (base32 | |
4b4ff693 | 120 | "1qzlxgq36sb1dk621nkbjw9k6y3css6q3z8xzx6nv7f327vanvp6")))) |
cf3504c6 EF |
121 | (build-system cmake-build-system) |
122 | (arguments | |
123 | `(#:configure-flags '("-DQST_BUILD_WEBKIT=1") | |
124 | #:phases | |
125 | (modify-phases %standard-phases | |
126 | ;; The program is meant to be run from the git repo or source tarball. | |
127 | (replace 'install | |
128 | (lambda* (#:key outputs #:allow-other-keys) | |
129 | (let* ((out (assoc-ref outputs "out")) | |
130 | (bin (string-append out "/bin"))) | |
131 | (install-file "QSyncthingTray" bin) | |
132 | (install-file (string-append | |
133 | "../QSyncthingTray-" | |
134 | ,(package-version qsyncthingtray) | |
135 | "/resources/images/Icon1024.png") | |
136 | (string-append | |
137 | out "/share/pixmaps/QSyncthingTray.png")) | |
138 | #t)))) | |
139 | #:tests? #f)) ; no test target | |
140 | (inputs | |
141 | `(("qtbase" ,qtbase) | |
142 | ("qtwebkit" ,qtwebkit))) | |
143 | (home-page "https://github.com/sieren/QSyncthingTray") | |
144 | (synopsis "Traybar Application for Syncthing") | |
145 | (description | |
146 | "A traybar application for syncthing. | |
147 | @enumerate | |
148 | @item Shows number of connections at a glance. | |
149 | @item Traffic statistics about incoming, outgoing and total throughput. | |
150 | @item Launches Syncthing and Syncthing-iNotifier if specified. | |
151 | @item Quickly pause Syncthing with one click. | |
152 | @item Last Synced Files - Quickly see the recently synchronised files and open | |
153 | their folder. | |
154 | @item Quick Access to all shared folders. | |
155 | @item Presents Syncthing UI in a separate view instead of using the browser. | |
156 | @item Supports authenticated HTTPS connections. | |
157 | @item Uses System Notifications about current connection status. | |
158 | @item Toggle for monochrome icon. | |
159 | @end enumerate\n") | |
160 | (license license:lgpl3+))) | |
7ee557a7 RW |
161 | |
162 | (define-public lsyncd | |
163 | (package | |
164 | (name "lsyncd") | |
165 | (version "2.2.1") | |
166 | (source | |
167 | (origin | |
168 | (method url-fetch) | |
169 | (uri (string-append "https://github.com/axkibe/lsyncd/archive/release-" | |
170 | version ".tar.gz")) | |
171 | (file-name (string-append name "-" version ".tar.gz")) | |
172 | (sha256 | |
173 | (base32 | |
174 | "0da7mrq2c578v2dd5x9v75l1fqrm28jvn28qkcd49y8p992nj6gl")))) | |
175 | (build-system cmake-build-system) | |
176 | (arguments | |
177 | `(;; The "tests" target is broken and assumes that tests are run in the | |
178 | ;; root directory. | |
179 | #:tests? #f | |
180 | #:test-target "tests" | |
181 | #:phases | |
182 | (modify-phases %standard-phases | |
183 | ;; No install target. | |
184 | (replace 'install | |
185 | (lambda* (#:key outputs #:allow-other-keys) | |
186 | (let* ((out (assoc-ref outputs "out")) | |
187 | (bin (string-append out "/bin")) | |
188 | (man (string-append out "/share/man/man1"))) | |
189 | (install-file "lsyncd" bin) | |
190 | (install-file (string-append "../lsyncd-release-" | |
191 | ,version | |
192 | "/doc/manpage/lsyncd.1") | |
193 | man) | |
194 | #t)))))) | |
195 | (native-inputs | |
196 | `(("lua" ,lua-5.2))) | |
197 | (home-page "https://github.com/axkibe/lsyncd") | |
198 | (synopsis "Synchronize local directories with remote targets") | |
199 | (description "Lsyncd watches a local directory trees event monitor | |
200 | interface (inotify or fsevents). It aggregates and combines events for a few | |
201 | seconds and then spawns one (or more) process(es) to synchronize the changes. | |
202 | By default this is rsync, which must be installed on all source and target | |
203 | machines. Lsyncd is thus a light-weight live mirror solution that is | |
204 | comparatively easy to install not requiring new filesystems or block devices | |
205 | and does not hamper local filesystem performance.") | |
206 | (license license:gpl2+))) |