summaryrefslogtreecommitdiff
path: root/var/spack/packages/ninja/package.py
blob: 9e6bf4e358dc1786c7fc8783bd495543202f235a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from spack import *
import os

class Ninja(Package):
    """ A small, fast Make alternative """
    homepage = "https://martine.github.io/ninja/"
    url      = "https://github.com/martine/ninja/archive/v1.6.0.tar.gz"

    version('1.6.0', '254133059f2da79d8727f654d7198f43')

    extends('python')

    def install(self, spec, prefix):
        sh = which('sh')
        python('configure.py', '--bootstrap')

        cp = which('cp')

        bindir = os.path.join(prefix, 'bin')
        mkdir(bindir)
        cp('-a', '-t', bindir, 'ninja')
        cp('-ra', 'misc', prefix)