diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/openldap/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/openldap/package.py | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/var/spack/repos/builtin/packages/openldap/package.py b/var/spack/repos/builtin/packages/openldap/package.py index 7591a3d4b6..91c9d70ad8 100644 --- a/var/spack/repos/builtin/packages/openldap/package.py +++ b/var/spack/repos/builtin/packages/openldap/package.py @@ -17,8 +17,9 @@ class Openldap(AutotoolsPackage): """ homepage = "https://www.openldap.org/" - url = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.48.tgz" + url = "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.6.0.tgz" + version('2.6.0', sha256='b71c580eac573e9aba15d95f33dd4dd08f2ed4f0d7fc09e08ad4be7ed1e41a4f') version('2.4.49', sha256='e3b117944b4180f23befe87d0dcf47f29de775befbc469dcf4ac3dab3311e56e') version('2.4.48', sha256='d9523ffcab5cd14b709fcf3cb4d04e8bc76bb8970113255f372bc74954c6074d') @@ -30,61 +31,73 @@ class Openldap(AutotoolsPackage): values=('gnutls', 'openssl'), multi=False) variant('perl', default=False, description='Perl backend to Slapd') + variant('sasl', default=True, description='Build with Cyrus SASL support') + variant('static', default=False, description='Build static libraries') + variant('shared', default=True, description='Build shared libraries') + variant('dynamic', default=True, description='Enable linking built binaries with dynamic libs') + variant('wt', default=False, description='Enable WiredTiger backend', when='@2.5.0:') + conflicts('~static', when='~shared') depends_on('icu4c', when='+icu') depends_on('gnutls', when='~client_only tls=gnutls') depends_on('openssl', when='~client_only tls=openssl') + depends_on('openssl@1.1.1:', when='~client_only tls=openssl @2.6.0:') depends_on('unixodbc', when='~client_only') depends_on('postgresql', when='~client_only') depends_on('berkeley-db', when='~client_only') # for slapd # Recommended dependencies by Linux From Scratch - # depends_on('cyrus-sasl', when='~client_only') # not avail. in spack yet + depends_on('cyrus-sasl', when='+sasl') # depends_on('openslp', when='~client_only') # not avail. in spack yet # depends_on('Pth', when='~client_only') # not avail. in spack yet depends_on('perl', when='~client_only+perl') # for slapd + depends_on('groff', type='build') + depends_on('pkgconfig', type='build') + depends_on('wiredtiger', when='@2.6.0:') # Ref: https://www.linuxfromscratch.org/blfs/view/svn/server/openldap.html @when('+client_only') def configure_args(self): - return ['CPPFLAGS=-D_GNU_SOURCE', - '--enable-static', - '--enable-dynamic', + args = ['CPPFLAGS=-D_GNU_SOURCE', '--disable-debug', '--disable-slapd', ] + args += self.with_or_without('cyrus-sasl', variant='sasl') + args += self.enable_or_disable('static') + args += self.enable_or_disable('shared') + args += self.enable_or_disable('dynamic') + return args @when('~client_only') def configure_args(self): # Ref: https://www.openldap.org/lists/openldap-technical/201009/msg00304.html args = ['CPPFLAGS=-D_GNU_SOURCE', # fixes a build error, see Ref above - '--enable-static', '--disable-debug', - '--with-cyrus-sasl', - '--enable-dynamic', '--enable-crypt', '--enable-spasswd', '--enable-slapd', '--enable-modules', '--enable-rlookups', '--enable-backends=mod', - '--disable-ndb', '--disable-sql', - '--disable-shell', - '--disable-bdb', - '--disable-hdb', '--enable-overlays=mod', ] - if '~client_only' in self.spec: - if 'tls=gnutls' in self.spec: - args.append('--with-tls=gnutls') - if 'tls=openssl' in self.spec: - args.append('--with-tls=openssl') + if self.spec.satisfies('@:2.5'): + args.extend(('--disable-ndb', '--disable-shell', '--disable-bdb', + '--disable-hdb')) + + args += self.enable_or_disable('static') + args += self.enable_or_disable('shared') + args += self.enable_or_disable('dynamic') + args += self.with_or_without('cyrus-sasl', variant='sasl') + args.append('--with-tls=' + self.spec.variants['tls'].value) + if self.spec.satisfies('@2.6.0: tls=gnutls'): + args += ['--disable-autoca'] + + if self.spec.satisfies('@2.5.0:'): + args += self.enable_or_disable('wt') - if '+perl' in self.spec: - args.append('--enable-perl') - else: - args.append('--disable-perl') + args += self.enable_or_disable('perl') return args |