summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
blob: 8d79eb9e3caaa02f523953d7ca408976987f0c78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack import *


class PacbioDazzDb(MakefilePackage):
    """The Dazzler Database Library. This version is a special fork
       required for some pacbio utilities."""

    homepage = "https://github.com/PacificBiosciences/DAZZ_DB"
    git      = "https://github.com/PacificBiosciences/DAZZ_DB.git"

    version('2017-04-10', commit='f29d27d51f460563481cd227d17f4bdc5e288365')

    depends_on('gmake', type='build')

    def edit(self, spec, prefix):
        mkdirp(prefix.bin)
        mkdirp(prefix.lib)
        mkdirp(prefix.include)
        makefile = FileFilter('Makefile')
        makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
        gmf = FileFilter('GNUmakefile')
        gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
                   'cp ${ALL} ' + prefix.bin)
        gmf.filter('rsync\s*-av\s*libdazzdb.*\s*\$\{PREFIX\}/lib',
                   'cp libdazzdb.* ' + prefix.lib)
        gmf.filter(('rsync\s*-av\s*\$\(wildcard\s*\$\{THISDIR\}/\*.h'
                    '\)\s*\$\{PREFIX\}/include'),
                   'cp *.h ' + prefix.include)