diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/leveldb/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/leveldb/package.py | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py index db61668021..e06f347e23 100644 --- a/var/spack/repos/builtin/packages/leveldb/package.py +++ b/var/spack/repos/builtin/packages/leveldb/package.py @@ -1,32 +1,13 @@ -############################################################################## -# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. +# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. # -# This file is part of Spack. -# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/spack/spack -# Please also see the NOTICE and LICENSE files for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + import glob from spack import * -class Leveldb(Package): +class Leveldb(MakefilePackage): """LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.""" @@ -39,21 +20,14 @@ class Leveldb(Package): depends_on("snappy") def install(self, spec, prefix): - make() - - mkdirp(prefix.include) - mkdirp(prefix.lib) - mkdirp(join_path(prefix.lib, 'pkgconfig')) - - cp = which('cp') + mkdirp(prefix.lib.pkgconfig) - # cp --preserve=links libleveldb.* prefix/lib - args = glob.glob('out-shared/libleveldb.*') \ - + glob.glob('out-static/libleveldb.*') - args.append(prefix.lib) - cp('--preserve=links', *args) + libraries = glob.glob('out-shared/libleveldb.*') + libraries += glob.glob('out-static/libleveldb.*') + for library in libraries: + install(library, prefix.lib) - cp('-r', 'include/leveldb', prefix.include) + install_tree('include', prefix.include) with open(join_path(prefix.lib, 'pkgconfig', 'leveldb.pc'), 'w') as f: f.write('prefix={0}\n'.format(prefix)) |