gnu: Move content of openssl module into tls module.
[jackhill/guix/guix.git] / gnu / packages / synergy.scm
CommitLineData
b5f4bb85
EB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages synergy)
20 #:use-module (guix packages)
5c852e08 21 #:use-module ((guix licenses) #:select (gpl2))
b5f4bb85
EB
22 #:use-module (guix download)
23 #:use-module (guix build-system cmake)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages curl)
26 #:use-module (gnu packages python)
cc2b77df 27 #:use-module (gnu packages tls)
b5f4bb85
EB
28 #:use-module (gnu packages xorg)
29 #:use-module (gnu packages zip)
30 #:use-module (srfi srfi-26))
31
32(define-public synergy
33 (package
34 (name "synergy")
5c852e08 35 (version "1.7.3")
b5f4bb85
EB
36 (source
37 (origin
38 (method url-fetch)
5c852e08
EB
39 (uri (string-append "https://github.com/synergy/synergy/archive/"
40 "v" version "-stable.tar.gz"))
41 (file-name (string-append name "-" version ".tar.gz"))
b5f4bb85
EB
42 (sha256
43 (base32
5c852e08
EB
44 "098y71fiw1n5i7g1p6vjfs5rz472j192p9izz2axxxhfvcyzrvx4"))
45 (modules '((guix build utils)))
46 (snippet
47 ;; Remove ~14MB of unnecessary bundled source and binaries
48 '(for-each delete-file-recursively
49 `("ext/bonjour"
50 "ext/LICENSE (OpenSSL)"
51 ,@(find-files "ext" "openssl-.*\\.tar\\.gz")
52 "ext/openssl-osx"
53 "ext/openssl-win32"
54 "ext/openssl-win64")))))
b5f4bb85
EB
55 (build-system cmake-build-system)
56 (native-inputs `(("unzip" ,unzip)))
57 (inputs
58 `(("python" ,python-wrapper)
5c852e08 59 ("openssl" ,openssl)
b5f4bb85
EB
60 ("curl" ,curl)
61 ("libxi" ,libxi)
62 ("libx11" ,libx11)
63 ("libxtst" ,libxtst)
64 ("xinput" ,xinput)))
65 (arguments
66 `(#:phases
5c852e08 67 (let ((srcdir (string-append "../synergy-" ,version "-stable")))
b5f4bb85
EB
68 (alist-cons-before
69 'configure 'unpack-aux-src
70 ;; TODO: package and use from system
71 (lambda* (#:key inputs #:allow-other-keys)
72 (let ((unzip (string-append
73 (assoc-ref inputs "unzip")
74 "/bin/unzip")))
75 (with-directory-excursion "ext"
76 (for-each
77 (lambda (f)
78 (system* unzip "-d" f (string-append f ".zip")))
5c852e08 79 '("gmock-1.6.0" "gtest-1.6.0")))))
b5f4bb85
EB
80 (alist-replace
81 'check
82 ;; Don't run "integtests" as it requires network and X an display.
83 (lambda _
84 (zero? (system* (string-append srcdir "/bin/unittests"))))
85 (alist-replace
86 'install
87 ;; There currently is no installation process, see:
88 ;; http://synergy-project.org/spit/issues/details/3317/
89 (lambda* (#:key outputs #:allow-other-keys)
5c852e08
EB
90 (let* ((out (assoc-ref outputs "out"))
91 (bin (string-append out "/bin"))
92 (ex (string-append out "/share/doc/synergy-"
93 ,version "/examples")))
b5f4bb85 94 (begin
5c852e08 95 (mkdir-p bin)
b5f4bb85
EB
96 (for-each
97 (lambda (f)
98 (copy-file (string-append srcdir "/bin/" f)
5c852e08 99 (string-append bin "/" f)))
b5f4bb85 100 '("synergyc" "synergys" "synergyd"
5c852e08
EB
101 "usynergy" "syntool"))
102 ;; Install example configuration files
103 (mkdir-p ex)
104 (for-each
105 (lambda (e)
106 (copy-file (string-append srcdir "/doc/" e)
107 (string-append ex "/" e)))
108 '("synergy.conf.example"
109 "synergy.conf.example-advanced"
110 "synergy.conf.example-basic")))))
b5f4bb85
EB
111 %standard-phases))))))
112 (home-page "http://www.synergy-project.org")
113 (synopsis "Mouse and keyboard sharing utility")
114 (description
115 "Synergy brings your computers together in one cohesive experience; its
116software for sharing one mouse and keyboard between multiple computers on your
117desk.")
118 (license gpl2)))