1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
26 #:use-module (gnu packages admin)
27 #:use-module (gnu packages cups)
28 #:use-module (gnu packages databases)
29 #:use-module (gnu packages tls)
30 #:use-module (gnu packages popt)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages openldap)
33 #:use-module (gnu packages readline)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages python))
38 (define-public iniparser
44 (uri (string-append "http://ndevilla.free.fr/iniparser/iniparser-"
48 "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf"))))
49 (build-system gnu-build-system)
51 '(#:phases (alist-replace
53 (lambda* (#:key outputs #:allow-other-keys)
54 (substitute* "Makefile"
56 (string-append (assoc-ref outputs "out") "/lib"))))
60 (and (zero? (system* "make" "libiniparser.so"))
61 (symlink "libiniparser.so.0" "libiniparser.so")))
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")))
73 (string-append dir "/"
77 (find-files "." "^lib.*\\.(so\\.|a)"))
78 (with-directory-excursion lib
79 (symlink "libiniparser.so.0" "libiniparser.so"))
82 (find-files "src" "\\.h$"))
85 (find-files "html" ".*"))
87 '("AUTHORS" "INSTALL" "LICENSE"
90 (home-page "http://ndevilla.free.fr/iniparser")
91 (synopsis "Standalone ini file parsing library")
93 "iniparser is a free stand-alone `ini' file parsing library (Windows
94 configuration files). It is written in portable ANSI C and should compile
104 (uri (string-append "https://www.samba.org/samba/ftp/stable/samba-"
108 "1pvh78d5magc7lriyx7v9k7crlgxccmsy2mqn0j9xcnb78qj2bg6"))))
109 (build-system gnu-build-system)
112 (modify-phases %standard-phases
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")))
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)))))))
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.
133 (inputs ; TODO: Add missing dependencies
138 ("iniparser" ,iniparser)
141 ("linux-pam" ,linux-pam)
142 ("openldap" ,openldap)
144 ("readline" ,readline)
150 ("pkg-config" ,pkg-config)
151 ("python" ,python-2))) ; incompatible with Python 3
152 (home-page "http://www.samba.org/")
154 "The standard Windows interoperability suite of programs for GNU and Unix")
156 "Since 1992, Samba has provided secure, stable and fast file and print
157 services for all clients using the SMB/CIFS protocol, such as all versions of
158 DOS and Windows, OS/2, GNU/Linux and many others.
160 Samba is an important component to seamlessly integrate Linux/Unix Servers and
161 Desktops into Active Directory environments using the winbind daemon.")
164 (define-public talloc
170 (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
174 "1pfx3kmj973hpacfw46fzfnjd7ms1j03ifkc30wk930brx8ffcrq"))))
175 (build-system gnu-build-system)
178 (modify-phases %standard-phases
180 (lambda* (#:key outputs #:allow-other-keys)
181 ;; test_magic_differs.sh has syntax error, and is not in the right
182 ;; place where wscript expected.
184 (substitute* "wscript"
185 (("magic_ret = .*") "magic_ret = 0\n"))
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)))))))))
193 `(("python" ,python-2)))
194 (home-page "http://talloc.samba.org")
195 (synopsis "Hierarchical, reference counted memory pool system")
197 "Talloc is a hierarchical, reference counted memory pool system with
198 destructors. It is the core memory allocator used in Samba.")
199 (license gpl3+))) ;; The bundled "replace" library uses LGPL3.
201 (define-public tevent
207 (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
211 "1gbh6d2m49j1v2hkaiyrh8bj02i5wxd4hqayzk2g44yyivbi8b16"))))
212 (build-system gnu-build-system)
215 (modify-phases %standard-phases
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"))))))))
224 `(("pkg-config" ,pkg-config)
225 ("python" ,python-2)))
227 `(("talloc" ,talloc))) ; required by tevent.pc
228 (synopsis "Event system library")
229 (home-page "https://tevent.samba.org/")
231 "Tevent is an event system based on the talloc memory management library.
232 It is the core event system used in Samba. The low level tevent has support for
233 many event types, including timers, signals, and the classic file descriptor events.")
242 (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
246 "08ab66qzigfsfxqdvp6lx1knwsl3sqsww309xbq17l7hfcjgbsa5"))))
247 (build-system gnu-build-system)
250 (modify-phases %standard-phases
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
259 "--bundled-libraries=NONE"))))))))
261 `(("pkg-config" ,pkg-config)
262 ("python" ,python-2)))
264 ;; ldb.pc refers to all these.
270 (synopsis "LDAP-like embedded database")
271 (home-page "https://ldb.samba.org/")
273 "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does
274 is provide a fast database with an LDAP-like API designed to be used within an
275 application. In some ways it can be seen as a intermediate solution between
276 key-value pair databases and a real LDAP database.")
285 (uri (string-append "https://www.samba.org/ftp/ppp/ppp-"
289 "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))))
290 (build-system gnu-build-system)
292 '(#:tests? #f ; no check target
293 #:make-flags '("CC=gcc")
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")))))))))
306 `(("libpcap" ,libpcap)))
307 (synopsis "Implementation of the Point-to-Point Protocol")
308 (home-page "https://ppp.samba.org/")
310 "The Point-to-Point Protocol (PPP) provides a standard way to establish
311 a network connection over a serial link. At present, this package supports IP
312 and 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))))