rewrite openldap.scm

This commit is contained in:
Jean-François GUILLAUME 2022-12-13 15:25:47 +01:00
parent 9ea3560a5e
commit 16ae2d732c
GPG key ID: 38751DAE145EFB5A

View file

@ -19,8 +19,7 @@
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls) #:use-module (gnu packages tls))
)
(define-public openldap (define-public openldap
(package (package
@ -28,12 +27,8 @@
(version "2.6.3") (version "2.6.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (list (uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") (sha256 (base32 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))))
))
(sha256 (base32 "0ihddk8c6hg9lkjv0wk0w13g8kb75r8dfsn1n6b77mzk3pbs38nj"))
)
)
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (list argon2 cyrus-sasl libevent libgcrypt libltdl lz4 openssl perl snappy unixodbc wiredtiger zlib)) (inputs (list argon2 cyrus-sasl libevent libgcrypt libltdl lz4 openssl perl snappy unixodbc wiredtiger zlib))
(native-inputs (list bdb groff libtool pkg-config)) (native-inputs (list bdb groff libtool pkg-config))
@ -67,17 +62,11 @@
#:phases (modify-phases %standard-phases #:phases (modify-phases %standard-phases
(add-before 'build 'make-depend (add-before 'build 'make-depend
(lambda* (#:key input #:allow-other-keys) (lambda* (#:key input #:allow-other-keys)
(invoke "make" "depend") (invoke "make" "depend"))))))
)
)
)
))
(synopsis "Implementation of the Lightweight Directory Access Protocol") (synopsis "Implementation of the Lightweight Directory Access Protocol")
(description "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") (description "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
(license license:openldap2.8) (license license:openldap2.8)
(home-page "https://www.openldap.org/") (home-page "https://www.openldap.org/")))
)
)
(define-public openldap-2.4.59 (define-public openldap-2.4.59
(package (package
@ -86,14 +75,8 @@
(version "2.4.59") (version "2.4.59")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (list (uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") (sha256 (base32 "0d1gw898gbkv46mw0gll3q0w2j2y9midlzh6f320d0nq8xkpvwwr"))))))
))
(sha256 (base32 "0d1gw898gbkv46mw0gll3q0w2j2y9midlzh6f320d0nq8xkpvwwr"))
)
)
)
)
(define-public openldap-2.5.13 (define-public openldap-2.5.13
(package (package
@ -102,14 +85,8 @@
(version "2.5.13") (version "2.5.13")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (list (uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz")))
(string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz") (sha256 (base32 "13007pv1vpp31dvnf9xzzcknqv9p75rqq412nrbprf7p9q646g7f"))))))
))
(sha256 (base32 "13007pv1vpp31dvnf9xzzcknqv9p75rqq412nrbprf7p9q646g7f"))
)
)
)
)
(define-public nss-pam-ldapd (define-public nss-pam-ldapd
(package (package
@ -118,16 +95,14 @@
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-" version ".tar.gz")) (uri (string-append "https://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-" version ".tar.gz"))
(sha256 (base32 "050fzcmxmf6y15dlcffc4gxr3wkk7fliqqwhlwqzbjwk8vkn3mn6")) (sha256 (base32 "050fzcmxmf6y15dlcffc4gxr3wkk7fliqqwhlwqzbjwk8vkn3mn6"))))
))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`( `(
#:configure-flags #:configure-flags
(list (string-append (list (string-append
"--with-pam-seclib-dir=" (assoc-ref %outputs "out") "/lib/security/") "--with-pam-seclib-dir=" (assoc-ref %outputs "out") "/lib/security/")
"--with-ldap-conf-file=/etc/nslcd.conf" "--with-ldap-conf-file=/etc/nslcd.conf" )
)
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'override-nslcd.conf-install-path (add-after 'unpack 'override-nslcd.conf-install-path
@ -135,20 +110,12 @@
(substitute* "Makefile.in" (substitute* "Makefile.in"
( (
("\\$\\(DESTDIR\\)\\$\\(NSLCD_CONF_PATH\\)") ("\\$\\(DESTDIR\\)\\$\\(NSLCD_CONF_PATH\\)")
(string-append (assoc-ref outputs "out") "/etc/nslcd.conf.example") (string-append (assoc-ref outputs "out") "/etc/nslcd.conf.example"))))))))
)
)
)
)
)
)
)
(inputs `( (inputs `(
("linux-pam", linux-pam) ("linux-pam", linux-pam)
("mit-krb5", mit-krb5) ("mit-krb5", mit-krb5)
("openldap", openldap) ("openldap", openldap)
("python", python) ("python", python)))
))
(home-page "https://arthurdejong.org/nss-pam-ldapd") (home-page "https://arthurdejong.org/nss-pam-ldapd")
(synopsis "NSS and PAM modules for LDAP") (synopsis "NSS and PAM modules for LDAP")
(description "nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS) (description "nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS)
@ -157,6 +124,4 @@ alias, netgroup, and basically any other information that you would normally
get from @file{/etc} flat files or NIS. It also provides a @dfn{Pluggable get from @file{/etc} flat files or NIS. It also provides a @dfn{Pluggable
Authentication Module} (PAM) to do identity and authentication management with Authentication Module} (PAM) to do identity and authentication management with
an LDAP server.") an LDAP server.")
(license license:lgpl2.1+) (license license:lgpl2.1+)))
)
)