gnu: icecat: Use system harfbuzz and graphite2 libraries.
[jackhill/guix/guix.git] / gnu / packages / ntp.scm
CommitLineData
d99e12d2 1;;; GNU Guix --- Functional package management for GNU
53a427cf 2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
b7921ba5 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4ee69624 4;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
604d20a2 5;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
3140844e 6;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
d99e12d2
JD
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages ntp)
24 #:use-module (gnu packages)
ce0614dd 25 #:use-module (gnu packages base)
52b321e9 26 #:use-module (gnu packages linux)
604d20a2 27 #:use-module (gnu packages autotools)
53a427cf 28 #:use-module (gnu packages pkg-config)
cc2b77df 29 #:use-module (gnu packages tls)
a60cd281 30 #:use-module (gnu packages libevent)
53a427cf 31 #:use-module ((guix licenses) #:prefix l:)
d99e12d2 32 #:use-module (guix packages)
53a427cf 33 #:use-module (guix utils)
d99e12d2 34 #:use-module (guix download)
604d20a2 35 #:use-module (guix git-download)
d99e12d2
JD
36 #:use-module (guix build-system gnu)
37 #:use-module (srfi srfi-1))
38
39(define-public ntp
40 (package
41 (name "ntp")
22f25392 42 (version "4.2.8p10")
d35de59b
EF
43 (source
44 (origin
45 (method url-fetch)
46 (uri (list (string-append
47 "http://archive.ntp.org/ntp4/ntp-"
48 (version-major+minor version)
49 "/ntp-" version ".tar.gz")
50 (string-append
51 "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-"
52 (version-major+minor version)
53 "/ntp-" version ".tar.gz")))
54 (sha256
55 (base32
22f25392 56 "17xrk7gxrl3hgg0i73n8qm53knyh01lf0f3l1zx9x6r1cip3dlnx"))
d35de59b
EF
57 (modules '((guix build utils)))
58 (snippet
59 '(begin
60 ;; Remove the bundled copy of libevent, but we must keep
61 ;; sntp/libevent/build-aux since configure.ac contains
62 ;; AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
63 (rename-file "sntp/libevent/build-aux"
64 "sntp/libevent:build-aux")
65 (delete-file-recursively "sntp/libevent")
66 (mkdir "sntp/libevent")
67 (rename-file "sntp/libevent:build-aux"
68 "sntp/libevent/build-aux")
69 #t))))
53a427cf
MW
70 (native-inputs `(("which" ,which)
71 ("pkg-config" ,pkg-config)))
52b321e9 72 (inputs
53a427cf 73 `(("openssl" ,openssl)
a60cd281 74 ("libevent" ,libevent)
53a427cf
MW
75 ;; Build with POSIX capabilities support on GNU/Linux. This allows 'ntpd'
76 ;; to run as non-root (when invoked with '-u'.)
77 ,@(if (string-suffix? "-linux"
78 (or (%current-target-system) (%current-system)))
79 `(("libcap" ,libcap))
80 '())))
a60cd281
MW
81 (arguments
82 `(#:phases
83 (modify-phases %standard-phases
84 (add-after 'unpack 'disable-network-test
85 (lambda _
86 (substitute* "tests/libntp/Makefile.in"
87 (("test-decodenetnum\\$\\(EXEEXT\\) ") ""))
88 #t)))))
d99e12d2 89 (build-system gnu-build-system)
e881752c 90 (synopsis "Real time clock synchronization system")
d99e12d2
JD
91 (description "NTP is a system designed to synchronize the clocks of
92computers over a network.")
53a427cf 93 (license (l:x11-style
d99e12d2
JD
94 "http://www.eecis.udel.edu/~mills/ntp/html/copyright.html"
95 "A non-copyleft free licence from the University of Delaware"))
96 (home-page "http://www.ntp.org")))
4ee69624
TUBK
97
98(define-public openntpd
99 (package
100 (name "openntpd")
6dbad376 101 (version "6.2p3")
4ee69624
TUBK
102 (source (origin
103 (method url-fetch)
4ee69624 104 (uri (string-append
644e5f17 105 "mirror://openbsd/OpenNTPD/" name "-" version ".tar.gz"))
4ee69624
TUBK
106 (sha256
107 (base32
6dbad376 108 "0fn12i4kzsi0zkr4qp3dp9bycmirnfapajqvdfx02zhr4hanj0kv"))))
4ee69624 109 (build-system gnu-build-system)
080e023d
LF
110 (inputs
111 `(("libressl" ,libressl))) ; enable TLS time constraints. See ntpd.conf(5).
4ee69624
TUBK
112 (home-page "http://www.openntpd.org/")
113 (synopsis "NTP client and server by the OpenBSD Project")
114 (description "OpenNTPD is the OpenBSD Project's implementation of a client
115and server for the Network Time Protocol. Its design goals include being
116secure, easy to configure, and accurate enough for most purposes, so it's more
117minimalist than ntpd.")
118 ;; A few of the source files are under bsd-3.
119 (license (list l:isc l:bsd-3))))
604d20a2
LC
120
121(define-public tlsdate
122 (package
123 (name "tlsdate")
124 (version "0.0.13")
125 (home-page "https://github.com/ioerror/tlsdate")
126 (source (origin
127 (method git-fetch)
128 (uri (git-reference
129 (commit (string-append "tlsdate-" version))
130 (url home-page)))
131 (sha256
132 (base32
133 "0w3v63qmbhpqlxjsvf4k3zp90k6mdzi8cdpgshan9iphy1f44xgl"))
134 (file-name (string-append name "-" version "-checkout"))))
135 (build-system gnu-build-system)
136 (arguments
137 '(#:phases (modify-phases %standard-phases
138 (add-after 'unpack 'autogen
139 (lambda _
140 ;; The ancestor of 'SOURCE_DATE_EPOCH'; it contains the
141 ;; date that is recorded in binaries. It must be a
142 ;; "recent date" since it is used to detect bogus dates
143 ;; received from servers.
144 (setenv "COMPILE_DATE" (number->string 1450563040))
145 (zero? (system* "sh" "autogen.sh")))))))
146 (inputs `(("openssl" ,openssl)
147 ("libevent" ,libevent)))
148 (native-inputs `(("pkg-config" ,pkg-config)
149 ("autoconf" ,autoconf)
150 ("automake" ,automake)
151 ("libtool" ,libtool)))
152 (synopsis "Extract remote time from TLS handshakes")
153 (description
154 "@command{tlsdate} sets the local clock by securely connecting with TLS
155to remote servers and extracting the remote time out of the secure handshake.
156Unlike ntpdate, @command{tlsdate} uses TCP, for instance connecting to a
157remote HTTPS or TLS enabled service, and provides some protection against
158adversaries that try to feed you malicious time information.")
159 (license l:bsd-3)))