1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
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.
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.
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/>.
19 (define-module (gnu packages samba)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix licenses)
24 #:use-module (gnu packages acl)
25 #:use-module (gnu packages popt)
26 #:use-module (gnu packages openldap)
27 #:use-module (gnu packages readline)
28 #:use-module (gnu packages libunwind)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages elf)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages python))
34 (define-public iniparser
40 (uri (string-append "http://ndevilla.free.fr/iniparser/iniparser-"
44 "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf"))))
45 (build-system gnu-build-system)
47 '(#:phases (alist-replace
49 (lambda* (#:key outputs #:allow-other-keys)
50 (substitute* "Makefile"
52 (string-append (assoc-ref outputs "out") "/lib"))))
56 (and (zero? (system* "make" "libiniparser.so"))
57 (symlink "libiniparser.so.0" "libiniparser.so")))
60 (lambda* (#:key outputs #:allow-other-keys)
61 (let* ((out (assoc-ref outputs "out"))
62 (lib (string-append out "/lib"))
63 (inc (string-append out "/include"))
64 (doc (string-append out "/share/doc"))
65 (html (string-append doc "/html")))
69 (string-append dir "/"
73 (find-files "." "^lib.*\\.(so\\.|a)"))
74 (with-directory-excursion lib
75 (symlink "libiniparser.so.0" "libiniparser.so"))
78 (find-files "src" "\\.h$"))
81 (find-files "html" ".*"))
83 '("AUTHORS" "INSTALL" "LICENSE"
86 (home-page "http://ndevilla.free.fr/iniparser")
87 (synopsis "Standalone ini file parsing library")
89 "iniparser is a free stand-alone `ini' file parsing library (Windows
90 configuration files). It is written in portable ANSI C and should compile
100 (uri (string-append "http://us3.samba.org/samba/ftp/stable/samba-"
104 "1phl6mmrc72jyvbyrw6cv6b92cxq3v2pbn1fh97nnb4hild1fnjg"))))
105 (build-system gnu-build-system)
107 '(#:phases (alist-cons-before
112 'strip 'add-lib-to-runpath
113 (lambda* (#:key outputs #:allow-other-keys)
114 (let* ((out (assoc-ref outputs "out"))
115 (lib (string-append out "/lib")))
116 ;; Add LIB to the RUNPATH of all the executables.
117 (with-directory-excursion out
118 (for-each (cut augment-rpath <> lib)
119 (append (find-files "bin" ".*")
120 (find-files "sbin" ".*"))))))
123 #:modules ((guix build gnu-build-system)
127 #:imported-modules ((guix build gnu-build-system)
131 ;; This flag is required to allow for "make test".
132 #:configure-flags '("--enable-socket-wrapper")
136 ;; XXX: The test infrastructure attempts to set password with
137 ;; smbpasswd, which fails with "smbpasswd -L can only be used by root."
138 ;; So disable tests until there's a workaround.
140 (inputs ; TODO: Add missing dependencies
144 ("libunwind" ,libunwind)
145 ("iniparser" ,iniparser)
147 ("openldap" ,openldap)
148 ("linux-pam" ,linux-pam)
149 ("readline" ,readline)
150 ("patchelf" ,patchelf))) ; for (guix build rpath)
151 (native-inputs ; for the test suite
153 ("python" ,python-wrapper)))
154 (home-page "http://www.samba.org/")
156 "The standard Windows interoperability suite of programs for GNU and Unix")
158 "Since 1992, Samba has provided secure, stable and fast file and print
159 services for all clients using the SMB/CIFS protocol, such as all versions of
160 DOS and Windows, OS/2, GNU/Linux and many others.
162 Samba is an important component to seamlessly integrate Linux/Unix Servers and
163 Desktops into Active Directory environments using the winbind daemon.")
166 (define-public talloc
172 (uri (string-append "http://www.samba.org/ftp/talloc/talloc-"
176 "13zh628hzlp2v9vj70knnfac2xbxqrdhgap30csq4zv4h8w3j087"))))
177 (build-system gnu-build-system)
179 '(#:phases (alist-replace
181 (lambda* (#:key outputs #:allow-other-keys)
182 ;; talloc uses a custom configuration script that runs a
183 ;; python script called 'waf'.
184 (setenv "CONFIG_SHELL" (which "sh"))
185 (let ((out (assoc-ref outputs "out")))
186 (zero? (system* "./configure"
187 (string-append "--prefix=" out)))))
190 `(("python" ,python-2)))
191 (home-page "http://talloc.samba.org")
192 (synopsis "Hierarchical, reference counted memory pool system")
194 "Talloc is a hierarchical, reference counted memory pool system with
195 destructors. It is the core memory allocator used in Samba.")
196 (license gpl3+))) ;; The bundled "replace" library uses LGPL3.