summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Streit <simon@netpanic.org>2021-12-29 14:41:03 +0100
committerSimon Streit <simon@netpanic.org>2022-01-06 00:10:09 +0100
commit80222b186611e4ff78ed95e4cf3606d504a23e3d (patch)
tree105ab186f1dbdc05fc17dc6bcc50a2b9c4213eee
parentb28da539611e0951e5bfa4afb66c5c78180da19d (diff)
packages: Modify samba to build with mit-krb5
-rw-r--r--siguix/packages/samba.scm44
1 files changed, 43 insertions, 1 deletions
diff --git a/siguix/packages/samba.scm b/siguix/packages/samba.scm
index 0da0421..0997651 100644
--- a/siguix/packages/samba.scm
+++ b/siguix/packages/samba.scm
@@ -58,16 +58,58 @@
;; Add avahi to inputs
(package/inherit samba
(name "samba-mod")
+ (arguments
+ `(#:make-flags '("TEST_OPTIONS=--quick") ;some tests are very long
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setup-docbook-stylesheets
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Append Samba's own DTDs to XML_CATALOG_FILES
+ ;; (c.f. docs-xml/build/README).
+ (copy-file "docs-xml/build/catalog.xml.in"
+ "docs-xml/build/catalog.xml")
+ (substitute* "docs-xml/build/catalog.xml"
+ (("/@abs_top_srcdir@")
+ (string-append (getcwd) "/docs-xml")))
+ ;; Honor XML_CATALOG_FILES.
+ (substitute* "buildtools/wafsamba/wafsamba.py"
+ (("XML_CATALOG_FILES=\"\\$\\{SAMBA_CATALOGS\\}" all)
+ (string-append all " $XML_CATALOG_FILES")))
+ #t))
+ (replace 'configure
+ ;; Samba uses a custom configuration script that runs WAF.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (libdir (string-append out "/lib")))
+ (invoke "./configure"
+ "--enable-selftest"
+ "--enable-fhs"
+ (string-append "--prefix=" out)
+ "--sysconfdir=/etc"
+ "--localstatedir=/var"
+ ;; Install public and private libraries into
+ ;; a single directory to avoid RPATH issues.
+ (string-append "--libdir=" libdir)
+ (string-append "--with-privatelibdir=" libdir)))))
+ (add-before 'install 'disable-etc,var-samba-directories-setup
+ (lambda _
+ (substitute* "dynconfig/wscript"
+ (("bld\\.INSTALL_DIR.*") ""))
+ #t)))
+ ;; FIXME: The test suite seemingly hangs after failing to provision the
+ ;; test environment.
+ #:tests? #f))
(inputs
(list acl
avahi ;new!
+ mit-krb5 ;new!
cmocka
cups
gamin
dbus
gpgme
gnutls
- heimdal
+ ;; heimdal
jansson
libarchive
libtirpc