You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

165 lines
6.8 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.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. (define-module (gnu packages samba)
  19. #:use-module (guix packages)
  20. #:use-module (guix download)
  21. #:use-module (guix build-system gnu)
  22. #:use-module (guix licenses)
  23. #:use-module (gnu packages acl)
  24. #:use-module (gnu packages popt)
  25. #:use-module (gnu packages openldap)
  26. #:use-module (gnu packages readline)
  27. #:use-module (gnu packages libunwind)
  28. #:use-module (gnu packages linux)
  29. #:use-module (gnu packages patchelf)
  30. #:use-module (gnu packages perl)
  31. #:use-module (gnu packages python))
  32. (define-public iniparser
  33. (package
  34. (name "iniparser")
  35. (version "3.1")
  36. (source (origin
  37. (method url-fetch)
  38. (uri (string-append "http://ndevilla.free.fr/iniparser/iniparser-"
  39. version ".tar.gz"))
  40. (sha256
  41. (base32
  42. "1igmxzcy0s25zcy9vmcw0kd13lh60r0b4qg8lnp1jic33f427pxf"))))
  43. (build-system gnu-build-system)
  44. (arguments
  45. '(#:phases (alist-replace
  46. 'configure
  47. (lambda* (#:key outputs #:allow-other-keys)
  48. (substitute* "Makefile"
  49. (("/usr/lib")
  50. (string-append (assoc-ref outputs "out") "/lib"))))
  51. (alist-replace
  52. 'build
  53. (lambda _
  54. (and (zero? (system* "make" "libiniparser.so"))
  55. (symlink "libiniparser.so.0" "libiniparser.so")))
  56. (alist-replace
  57. 'install
  58. (lambda* (#:key outputs #:allow-other-keys)
  59. (let* ((out (assoc-ref outputs "out"))
  60. (lib (string-append out "/lib"))
  61. (inc (string-append out "/include"))
  62. (doc (string-append out "/share/doc"))
  63. (html (string-append doc "/html")))
  64. (define (copy dir)
  65. (lambda (file)
  66. (copy-file file
  67. (string-append dir "/"
  68. (basename file)))))
  69. (mkdir-p lib)
  70. (for-each (copy lib)
  71. (find-files "." "^lib.*\\.(so\\.|a)"))
  72. (with-directory-excursion lib
  73. (symlink "libiniparser.so.0" "libiniparser.so"))
  74. (mkdir-p inc)
  75. (for-each (copy inc)
  76. (find-files "src" "\\.h$"))
  77. (mkdir-p html)
  78. (for-each (copy html)
  79. (find-files "html" ".*"))
  80. (for-each (copy doc)
  81. '("AUTHORS" "INSTALL" "LICENSE"
  82. "README"))))
  83. %standard-phases)))))
  84. (home-page "http://ndevilla.free.fr/iniparser")
  85. (synopsis "Standalone ini file parsing library")
  86. (description
  87. "iniparser is a free stand-alone `ini' file parsing library (Windows
  88. configuration files). It is written in portable ANSI C and should compile
  89. anywhere.")
  90. (license x11)))
  91. (define-public samba
  92. (package
  93. (name "samba")
  94. (version "3.6.8")
  95. (source (origin
  96. (method url-fetch)
  97. (uri (string-append "http://us3.samba.org/samba/ftp/stable/samba-"
  98. version ".tar.gz"))
  99. (sha256
  100. (base32
  101. "1phl6mmrc72jyvbyrw6cv6b92cxq3v2pbn1fh97nnb4hild1fnjg"))))
  102. (build-system gnu-build-system)
  103. (arguments
  104. '(#:phases (alist-cons-before
  105. 'configure 'chdir
  106. (lambda _
  107. (chdir "source3"))
  108. (alist-cons-after
  109. 'strip 'add-lib-to-runpath
  110. (lambda* (#:key outputs #:allow-other-keys)
  111. (let* ((out (assoc-ref outputs "out"))
  112. (lib (string-append out "/lib")))
  113. ;; Add LIB to the RUNPATH of all the executables.
  114. (with-directory-excursion out
  115. (for-each (cut augment-rpath <> lib)
  116. (append (find-files "bin" ".*")
  117. (find-files "sbin" ".*"))))))
  118. %standard-phases))
  119. #:modules ((guix build gnu-build-system)
  120. (guix build utils)
  121. (guix build rpath)
  122. (srfi srfi-26))
  123. #:imported-modules ((guix build gnu-build-system)
  124. (guix build utils)
  125. (guix build rpath))
  126. ;; This flag is required to allow for "make test".
  127. #:configure-flags '("--enable-socket-wrapper")
  128. #:test-target "test"
  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
  134. `(;; ("cups" ,cups)
  135. ("acl" ,acl)
  136. ;; ("gamin" ,gamin)
  137. ("libunwind" ,libunwind)
  138. ("iniparser" ,iniparser)
  139. ("popt" ,popt)
  140. ("openldap" ,openldap)
  141. ("linux-pam" ,linux-pam)
  142. ("readline" ,readline)
  143. ("patchelf" ,patchelf))) ; for (guix build rpath)
  144. (native-inputs ; for the test suite
  145. `(("perl" ,perl)
  146. ("python" ,python-wrapper)))
  147. (home-page "http://www.samba.org/")
  148. (synopsis
  149. "The standard Windows interoperability suite of programs for GNU and Unix")
  150. (description
  151. "Since 1992, Samba has provided secure, stable and fast file and print
  152. services for all clients using the SMB/CIFS protocol, such as all versions of
  153. DOS and Windows, OS/2, GNU/Linux and many others.
  154. Samba is an important component to seamlessly integrate Linux/Unix Servers and
  155. Desktops into Active Directory environments using the winbind daemon.")
  156. (license gpl3+)))