mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 14:18:38 +02:00
169 lines
7.5 KiB
Scheme
169 lines
7.5 KiB
Scheme
(define-module (glicid packages openldap)
|
|
;; #:use-module (guix)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module ((guix licenses) #:select (openldap2.8 lgpl2.1+ gpl3+ psfl expat))
|
|
#:use-module (guix packages)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix download)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (gnu packages base)
|
|
#:use-module (gnu packages autotools)
|
|
#:use-module (gnu packages check)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages cyrus-sasl)
|
|
#:use-module (gnu packages dbm)
|
|
#:use-module (gnu packages documentation)
|
|
#:use-module (gnu packages gettext)
|
|
#:use-module (gnu packages gnupg)
|
|
#:use-module (gnu packages groff)
|
|
#:use-module (gnu packages icu4c)
|
|
#:use-module (gnu packages kerberos)
|
|
#:use-module (gnu packages libevent)
|
|
#:use-module (gnu packages linux)
|
|
#:use-module (gnu packages networking)
|
|
#:use-module (gnu packages nss)
|
|
#:use-module (gnu packages password-utils)
|
|
#:use-module (gnu packages pcre)
|
|
#:use-module (gnu packages perl)
|
|
#:use-module (gnu packages pkg-config)
|
|
#:use-module (gnu packages python)
|
|
#:use-module (gnu packages python-xyz)
|
|
#:use-module (gnu packages rsync)
|
|
#:use-module (gnu packages selinux)
|
|
#:use-module (gnu packages time)
|
|
#:use-module (gnu packages tls)
|
|
#:use-module (gnu packages web)
|
|
#:use-module (gnu packages databases)
|
|
#:use-module (gnu packages password-utils)
|
|
)
|
|
|
|
(define-public glicid-openldap
|
|
(package
|
|
(name "glicid-openldap")
|
|
(version "2.5.7")
|
|
(synopsis "Implementation of the Lightweight Directory Access Protocol")
|
|
(description "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
|
|
(license openldap2.8)
|
|
(home-page "https://www.openldap.org/")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (list
|
|
(string-append "https://www.openldap.org/software/download/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "http://gpl.savoirfairelinux.net/pub/mirrors/openldap/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "http://repository.linagora.org/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "ftp://ftp.ntua.gr/mirror/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "https://mirror-hk.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "https://mirror.koddos.net/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
(string-append "https://mirror.lyrahosting.com/OpenLDAP/" "openldap-release/openldap-" version ".tgz")
|
|
))
|
|
(sha256 ( base32 "1ayr76sa5hjwldqzis5v71sbp88hd3hysc00gw1raqn33c05g5za" ))
|
|
)
|
|
)
|
|
(build-system gnu-build-system)
|
|
(inputs `(
|
|
("bdb", bdb)
|
|
("cyrus-sasl", cyrus-sasl)
|
|
("gnutls", gnutls)
|
|
("libgcrypt", libgcrypt)
|
|
("zlib", zlib)
|
|
("libltdl", libltdl)
|
|
("pkg-config", pkg-config)
|
|
("libevent", libevent)
|
|
("libtool", libtool)
|
|
("groff", groff)
|
|
("openssl", openssl)
|
|
("argon2", argon2)
|
|
("wiredtiger", wiredtiger)
|
|
("snappy", snappy)
|
|
("lz4", lz4)
|
|
))
|
|
(arguments '(
|
|
; this is needed because the make check does not work inside guix
|
|
#:tests? #f
|
|
#:configure-flags '(
|
|
"--enable-debug" "--enable-dynamic" "--enable-syslog" "--enable-ipv6" "--enable-local" "--enable-slapd" "--enable-dynacl"
|
|
"--enable-aci" "--enable-cleartext" "--enable-crypt" "--enable-spasswd" "--enable-modules" "--enable-rlookups" "--enable-slapi"
|
|
"--enable-backends=mod" "--enable-overlays=mod" "--enable-argon2" "--enable-balancer" "--disable-static"
|
|
"--enable-shared" "--with-tls=openssl"
|
|
)
|
|
; Disable install stripping as it breaks cross-compiling.
|
|
#:make-flags '("STRIP=")
|
|
#:phases (modify-phases %standard-phases
|
|
(add-before 'build 'make-depend
|
|
(lambda* (#:key input #:allow-other-keys)
|
|
(invoke "make" "depend")
|
|
)
|
|
)
|
|
)
|
|
))
|
|
)
|
|
)
|
|
;;YD;; ; (define-record-type* <openldap-configuration>
|
|
;;YD;; ; openldap-configuration make-openldap-configuration
|
|
;;YD;; openldap-configuration?
|
|
;;YD;; (openldap openldap-configuration-openldap ;<package>
|
|
;;YD;; (default openldap-glicid)
|
|
;;YD;; )
|
|
;;YD;; (arguments openldap-configuration-arguments ;list of strings
|
|
;;YD;; (default '())
|
|
;;YD;; )
|
|
;;YD;; (logflags openldap-configuration-logflags ;number
|
|
;;YD;; (default "0")
|
|
;;YD;; )
|
|
;;YD;; (log-file openldap-configuration-log-file ; string
|
|
;;YD;; (default "/var/log/slapd.log")
|
|
;;YD;; )
|
|
;;YD;; (pid-file openldap-configuration-pid-file ; string
|
|
;;YD;; (default "/var/run/openldap/slapd.pid")
|
|
;;YD;; )
|
|
;;YD;; (config-file openldap-configuration-config-file ; string
|
|
;;YD;; (default %default-slapd.conf)
|
|
;;YD;; )
|
|
;;YD;; (schema-dir openldap-configuration-schema-dir ; string
|
|
;;YD;; (default '())
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; (define %default-slapd.conf
|
|
;;YD;; (plain-file "slapd.conf" "
|
|
;;YD;; # Empty file for test
|
|
;;YD;; "))
|
|
;;YD;; (define schema_dir (local-file "ldap_schema" #:recursive? #t))
|
|
;;YD;; (define openldap-shepherd-service
|
|
;;YD;; (match-lambda
|
|
;;YD;; (($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
|
|
;;YD;; (list
|
|
;;YD;; (shepherd-service
|
|
;;YD;; (provision '(slapd) )
|
|
;;YD;; (documentation "Run openldap.")
|
|
;;YD;; (requirement '(user-processes))
|
|
;;YD;; (respawn? #f)
|
|
;;YD;; (start #~(make-forkexec-constructor
|
|
;;YD;; (list
|
|
;;YD;; #$(file-append openldap-glicid "/libexec/slapd")
|
|
;;YD;; "-h 'ldap:;;YD;;/ ldaps:;;YD;;/'"
|
|
;;YD;; "-d" #$logflags
|
|
;;YD;; "-f" #$config-file
|
|
;;YD;; )
|
|
;;YD;; #:pid-file #$pid-file
|
|
;;YD;; ))
|
|
;;YD;; (stop #~(make-kill-destructor))
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; (define openldap-service-type
|
|
;;YD;; (service-type (name 'slapd)
|
|
;;YD;; (extensions
|
|
;;YD;; (list (
|
|
;;YD;; service-extension
|
|
;;YD;; shepherd-root-service-type
|
|
;;YD;; openldap-shepherd-service
|
|
;;YD;; ))
|
|
;;YD;; )
|
|
;;YD;; (description "Run @uref{https:;;YD;;www.openldap.org, Openldap} community developped LDAP software.")
|
|
;;YD;; )
|
|
;;YD;; )
|
|
;;YD;; )
|
|
|