2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-05-12 12:22:25 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2015-09-23 03:17:01 +08:00
|
|
|
|
2016-08-10 16:50:00 +08:00
|
|
|
|
2017-07-22 06:12:17 +08:00
|
|
|
class Lmdb(MakefilePackage):
|
|
|
|
"""Symas LMDB is an extraordinarily fast, memory-efficient database we
|
|
|
|
developed for the Symas OpenLDAP Project. With memory-mapped files, it
|
|
|
|
has the read performance of a pure in-memory database while retaining
|
|
|
|
the persistence of standard disk-based databases."""
|
2015-09-23 03:17:01 +08:00
|
|
|
|
2017-07-22 06:12:17 +08:00
|
|
|
homepage = "https://lmdb.tech/"
|
|
|
|
url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.21.tar.gz"
|
2015-09-23 03:17:01 +08:00
|
|
|
|
2021-05-13 17:31:02 +08:00
|
|
|
version('0.9.29', sha256='22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb')
|
2019-10-26 06:34:13 +08:00
|
|
|
version('0.9.24', sha256='44602436c52c29d4f301f55f6fd8115f945469b868348e3cddaf91ab2473ea26')
|
2019-10-11 13:44:41 +08:00
|
|
|
version('0.9.22', sha256='f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28')
|
|
|
|
version('0.9.21', sha256='1187b635a4cc415bb6972bba346121f81edd996e99b8f0816151d4090f90b559')
|
|
|
|
version('0.9.16', sha256='49d7b40949f2ced9bc8b23ea6a89e75471a1c9126537a8b268c318a00b84322b')
|
2015-09-23 03:17:01 +08:00
|
|
|
|
2017-07-22 06:12:17 +08:00
|
|
|
build_directory = 'libraries/liblmdb'
|
|
|
|
|
2021-05-19 08:18:48 +08:00
|
|
|
@property
|
|
|
|
def build_targets(self):
|
|
|
|
return ['CC={0}'.format(spack_cc)]
|
|
|
|
|
2017-07-22 06:12:17 +08:00
|
|
|
@property
|
|
|
|
def install_targets(self):
|
|
|
|
return ['prefix={0}'.format(self.prefix), 'install']
|
|
|
|
|
|
|
|
@run_after('install')
|
|
|
|
def install_pkgconfig(self):
|
|
|
|
mkdirp(self.prefix.lib.pkgconfig)
|
|
|
|
|
|
|
|
with open(join_path(self.prefix.lib.pkgconfig, 'lmdb.pc'), 'w') as f:
|
|
|
|
f.write('prefix={0}\n'.format(self.prefix))
|
|
|
|
f.write('exec_prefix=${prefix}\n')
|
|
|
|
f.write('libdir={0}\n'.format(self.prefix.lib))
|
|
|
|
f.write('includedir={0}\n'.format(self.prefix.include))
|
|
|
|
f.write('\n')
|
|
|
|
f.write('Name: LMDB\n')
|
|
|
|
f.write('Description: Symas LMDB is an extraordinarily fast, '
|
|
|
|
'memory-efficient database.\n')
|
|
|
|
f.write('Version: {0}\n'.format(self.spec.version))
|
|
|
|
f.write('Cflags: -I${includedir}\n')
|
|
|
|
f.write('Libs: -L${libdir} -llmdb\n')
|