2015-12-31 03:13:09 +08:00
|
|
|
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')
|
|
|
|
|
2016-03-31 04:17:52 +08:00
|
|
|
bindir = os.path.join(prefix, 'bin/')
|
2015-12-31 03:13:09 +08:00
|
|
|
mkdir(bindir)
|
2016-03-31 04:17:52 +08:00
|
|
|
cp('-a', 'ninja', bindir)
|
|
|
|
cp('-a', 'misc', prefix)
|