gnu: Add emacs-slime.
[jackhill/guix/guix.git] / gnu / packages / samba.scm
CommitLineData
a40f1543 1;;; GNU Guix --- Functional package management for GNU
8ff3df5b 2;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
baece08a 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
a40f1543
LC
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
20(define-module (gnu packages samba)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix licenses)
25 #:use-module (gnu packages acl)
ae916e02 26 #:use-module (gnu packages admin)
710964d1 27 #:use-module (gnu packages cups)
52513595 28 #:use-module (gnu packages databases)
710964d1 29 #:use-module (gnu packages tls)
a40f1543 30 #:use-module (gnu packages popt)
0674b3c9 31 #:use-module (gnu packages pkg-config)
a40f1543
LC
32 #:use-module (gnu packages openldap)
33 #:use-module (gnu packages readline)
a40f1543
LC
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages python))
37
38(define-public iniparser
39 (package
40 (name "iniparser")
41 (version "3.1")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "http://ndevilla.free.fr/iniparser/iniparser-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf"))))
49 (build-system gnu-build-system)
50 (arguments
51 '(#:phases (alist-replace
52 'configure
53 (lambda* (#:key outputs #:allow-other-keys)
54 (substitute* "Makefile"
55 (("/usr/lib")
56 (string-append (assoc-ref outputs "out") "/lib"))))
57 (alist-replace
58 'build
59 (lambda _
60 (and (zero? (system* "make" "libiniparser.so"))
61 (symlink "libiniparser.so.0" "libiniparser.so")))
62 (alist-replace
63 'install
64 (lambda* (#:key outputs #:allow-other-keys)
65 (let* ((out (assoc-ref outputs "out"))
66 (lib (string-append out "/lib"))
67 (inc (string-append out "/include"))
68 (doc (string-append out "/share/doc"))
69 (html (string-append doc "/html")))
70 (define (copy dir)
71 (lambda (file)
72 (copy-file file
73 (string-append dir "/"
74 (basename file)))))
75 (mkdir-p lib)
76 (for-each (copy lib)
77 (find-files "." "^lib.*\\.(so\\.|a)"))
78 (with-directory-excursion lib
79 (symlink "libiniparser.so.0" "libiniparser.so"))
80 (mkdir-p inc)
81 (for-each (copy inc)
82 (find-files "src" "\\.h$"))
83 (mkdir-p html)
84 (for-each (copy html)
85 (find-files "html" ".*"))
86 (for-each (copy doc)
87 '("AUTHORS" "INSTALL" "LICENSE"
88 "README"))))
89 %standard-phases)))))
90 (home-page "http://ndevilla.free.fr/iniparser")
91 (synopsis "Standalone ini file parsing library")
92 (description
93 "iniparser is a free stand-alone `ini' file parsing library (Windows
94configuration files). It is written in portable ANSI C and should compile
95anywhere.")
96 (license x11)))
97
98(define-public samba
99 (package
100 (name "samba")
77553dff 101 (version "4.3.3")
a40f1543
LC
102 (source (origin
103 (method url-fetch)
baece08a 104 (uri (string-append "https://www.samba.org/samba/ftp/stable/samba-"
a40f1543
LC
105 version ".tar.gz"))
106 (sha256
107 (base32
77553dff 108 "1pvh78d5magc7lriyx7v9k7crlgxccmsy2mqn0j9xcnb78qj2bg6"))))
a40f1543
LC
109 (build-system gnu-build-system)
110 (arguments
710964d1
SB
111 '(#:phases
112 (modify-phases %standard-phases
113 (replace 'configure
114 ;; samba uses a custom configuration script that runs waf.
115 (lambda* (#:key outputs #:allow-other-keys)
116 (let* ((out (assoc-ref outputs "out"))
117 (libdir (string-append out "/lib")))
118 (zero? (system*
119 "./configure"
120 "--enable-fhs"
121 ;; XXX: heimdal not packaged.
122 "--bundled-libraries=com_err"
123 (string-append "--prefix=" out)
124 ;; Install public and private libraries into
125 ;; a single directory to avoid RPATH issues.
126 (string-append "--libdir=" libdir)
127 (string-append "--with-privatelibdir=" libdir)))))))
a40f1543
LC
128
129 ;; XXX: The test infrastructure attempts to set password with
130 ;; smbpasswd, which fails with "smbpasswd -L can only be used by root."
131 ;; So disable tests until there's a workaround.
132 #:tests? #f))
133 (inputs ; TODO: Add missing dependencies
710964d1
SB
134 `(("acl" ,acl)
135 ("cups" ,cups)
a40f1543 136 ;; ("gamin" ,gamin)
710964d1 137 ("gnutls" ,gnutls)
a40f1543 138 ("iniparser" ,iniparser)
710964d1
SB
139 ("libaio" ,libaio)
140 ("ldb" ,ldb)
a40f1543 141 ("linux-pam" ,linux-pam)
710964d1
SB
142 ("openldap" ,openldap)
143 ("popt" ,popt)
3665b4dc 144 ("readline" ,readline)
710964d1
SB
145 ("talloc" ,talloc)
146 ("tevent" ,tevent)
147 ("tdb" ,tdb)))
148 (native-inputs
a40f1543 149 `(("perl" ,perl)
710964d1
SB
150 ("pkg-config" ,pkg-config)
151 ("python" ,python-2))) ; incompatible with Python 3
a40f1543
LC
152 (home-page "http://www.samba.org/")
153 (synopsis
154 "The standard Windows interoperability suite of programs for GNU and Unix")
155 (description
156 "Since 1992, Samba has provided secure, stable and fast file and print
157services for all clients using the SMB/CIFS protocol, such as all versions of
158DOS and Windows, OS/2, GNU/Linux and many others.
159
160Samba is an important component to seamlessly integrate Linux/Unix Servers and
161Desktops into Active Directory environments using the winbind daemon.")
162 (license gpl3+)))
1790739c
DT
163
164(define-public talloc
165 (package
166 (name "talloc")
095da023 167 (version "2.1.5")
1790739c
DT
168 (source (origin
169 (method url-fetch)
01e64ef5 170 (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
1790739c
DT
171 version ".tar.gz"))
172 (sha256
173 (base32
095da023 174 "1pfx3kmj973hpacfw46fzfnjd7ms1j03ifkc30wk930brx8ffcrq"))))
1790739c
DT
175 (build-system gnu-build-system)
176 (arguments
960ae0cd
SB
177 '(#:phases
178 (modify-phases %standard-phases
179 (replace 'configure
180 (lambda* (#:key outputs #:allow-other-keys)
095da023
SB
181 ;; test_magic_differs.sh has syntax error, and is not in the right
182 ;; place where wscript expected.
183 ;; Skip the test.
184 (substitute* "wscript"
185 (("magic_ret = .*") "magic_ret = 0\n"))
960ae0cd
SB
186 ;; talloc uses a custom configuration script that runs a
187 ;; python script called 'waf'.
188 (setenv "CONFIG_SHELL" (which "sh"))
189 (let ((out (assoc-ref outputs "out")))
190 (zero? (system* "./configure"
191 (string-append "--prefix=" out)))))))))
1790739c
DT
192 (inputs
193 `(("python" ,python-2)))
194 (home-page "http://talloc.samba.org")
195 (synopsis "Hierarchical, reference counted memory pool system")
196 (description
197 "Talloc is a hierarchical, reference counted memory pool system with
198destructors. It is the core memory allocator used in Samba.")
199 (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
ae916e02 200
0674b3c9
SB
201(define-public tevent
202 (package
203 (name "tevent")
204 (version "0.9.26")
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
208 version ".tar.gz"))
209 (sha256
210 (base32
211 "1gbh6d2m49j1v2hkaiyrh8bj02i5wxd4hqayzk2g44yyivbi8b16"))))
212 (build-system gnu-build-system)
213 (arguments
214 '(#:phases
215 (modify-phases %standard-phases
216 (replace 'configure
217 ;; tevent uses a custom configuration script that runs waf.
218 (lambda* (#:key outputs #:allow-other-keys)
219 (let ((out (assoc-ref outputs "out")))
220 (zero? (system* "./configure"
221 (string-append "--prefix=" out)
222 "--bundled-libraries=NONE"))))))))
223 (native-inputs
224 `(("pkg-config" ,pkg-config)
225 ("python" ,python-2)))
226 (propagated-inputs
227 `(("talloc" ,talloc))) ; required by tevent.pc
228 (synopsis "Event system library")
229 (home-page "https://tevent.samba.org/")
230 (description
231 "Tevent is an event system based on the talloc memory management library.
232It is the core event system used in Samba. The low level tevent has support for
233many event types, including timers, signals, and the classic file descriptor events.")
234 (license lgpl3+)))
235
52513595
SB
236(define-public ldb
237 (package
238 (name "ldb")
f6cddbef 239 (version "1.1.24")
52513595
SB
240 (source (origin
241 (method url-fetch)
242 (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
243 version ".tar.gz"))
244 (sha256
245 (base32
f6cddbef 246 "08ab66qzigfsfxqdvp6lx1knwsl3sqsww309xbq17l7hfcjgbsa5"))))
52513595
SB
247 (build-system gnu-build-system)
248 (arguments
249 '(#:phases
250 (modify-phases %standard-phases
251 (replace 'configure
252 ;; ldb use a custom configuration script that runs waf.
253 (lambda* (#:key outputs #:allow-other-keys)
254 (let ((out (assoc-ref outputs "out")))
255 (zero? (system* "./configure"
256 (string-append "--prefix=" out)
257 (string-append "--with-modulesdir=" out
258 "/lib/ldb/modules")
259 "--bundled-libraries=NONE"))))))))
260 (native-inputs
261 `(("pkg-config" ,pkg-config)
262 ("python" ,python-2)))
263 (propagated-inputs
264 ;; ldb.pc refers to all these.
265 `(("talloc" ,talloc)
266 ("tdb" ,tdb)))
267 (inputs
268 `(("popt" ,popt)
269 ("tevent" ,tevent)))
270 (synopsis "LDAP-like embedded database")
271 (home-page "https://ldb.samba.org/")
272 (description
273 "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does
274is provide a fast database with an LDAP-like API designed to be used within an
275application. In some ways it can be seen as a intermediate solution between
276key-value pair databases and a real LDAP database.")
277 (license lgpl3+)))
278
ae916e02
SB
279(define-public ppp
280 (package
281 (name "ppp")
282 (version "2.4.7")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
286 version ".tar.gz"))
287 (sha256
288 (base32
289 "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
290 (build-system gnu-build-system)
291 (arguments
292 '(#:tests? #f ; no check target
293 #:make-flags '("CC=gcc")
294 #:phases
295 (modify-phases %standard-phases
296 (add-before 'configure 'patch-Makefile
297 (lambda* (#:key inputs #:allow-other-keys)
298 (let ((libc (assoc-ref inputs "libc"))
299 (libpcap (assoc-ref inputs "libpcap")))
300 (substitute* "pppd/Makefile.linux"
301 (("/usr/include/crypt\\.h")
302 (string-append libc "/include/crypt.h"))
303 (("/usr/include/pcap-bpf.h")
304 (string-append libpcap "/include/pcap-bpf.h")))))))))
305 (inputs
306 `(("libpcap" ,libpcap)))
307 (synopsis "Implementation of the Point-to-Point Protocol")
308 (home-page "https://ppp.samba.org/")
309 (description
310 "The Point-to-Point Protocol (PPP) provides a standard way to establish
311a network connection over a serial link. At present, this package supports IP
312and IPV6 and the protocols layered above them, such as TCP and UDP.")
313 ;; pppd, pppstats and pppdump are under BSD-style notices.
314 ;; some of the pppd plugins are GPL'd.
315 ;; chat is public domain.
316 (license (list bsd-3 bsd-4 gpl2+ public-domain))))