summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/ecos/package.py
blob: 7ce3427a3f6c432812763fc3d42e839391a9c43d (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-2020 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 Ecos(MakefilePackage):
    """A lightweight conic solver for second-order cone programming."""

    homepage = "https://github.com/embotech/ecos"
    url      = "https://github.com/embotech/ecos/archive/2.0.7.tar.gz"

    version('2.0.7',    sha256='bdb6a84f7d150820459bd0a796cb64ffbb019afb95dc456d22acc2dafb2e70e0')

    build_targets = ['all', 'shared']

    def install(self, spec, prefix):
        install_tree('include', prefix.include)

        mkdir(prefix.lib)
        install('libecos.a', prefix.lib)
        install('libecos_bb.a', prefix.lib)
        install('libecos.so', prefix.lib)

        mkdir(prefix.bin)
        install('runecos', prefix.bin)
        install('runecosexp', prefix.bin)