summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
blob: 43630ecc5e39186044a6fa9f25591b8a5ad416ad (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
# 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 PacbioDextractor(MakefilePackage):
    """The Dextractor and Compression Command Library. This is a special
       fork required by some pacbio utilities."""

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

    version('2016-08-09', commit='89726800346d0bed15d98dcc577f4c7733aab4b1')

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

    def edit(self, spec, prefix):
        mkdirp(prefix.bin)
        makefile = FileFilter('Makefile')
        makefile.filter('PATH_HDF5\s*=\s*/sw/apps/hdf5/current',
                        'PATH_HDF5 = ' + spec['hdf5'].prefix)
        makefile.filter('PATH_HDF5\*s=\s*/usr/local/hdf5', '')
        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)