Add new package: http-load (#16676)
* Add new package: http-load * refine version format * fix date/version error
This commit is contained in:
parent
3f6164053d
commit
9d766ae1fa
1 changed files with 33 additions and 0 deletions
33
var/spack/repos/builtin/packages/http-load/package.py
Normal file
33
var/spack/repos/builtin/packages/http-load/package.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 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 *
|
||||
import datetime
|
||||
|
||||
|
||||
class HttpLoad(MakefilePackage):
|
||||
"""http_load - multiprocessing http test client"""
|
||||
|
||||
homepage = "http://www.acme.com/software/http_load/"
|
||||
url = "http://www.acme.com/software/http_load/http_load-09Mar2016.tar.gz"
|
||||
|
||||
version('2016-03-09', sha256='a2bf118d88f6acd2a082cbf275d141538149caaa0a4ce1bcc66680668e781306')
|
||||
|
||||
def url_for_version(self, version):
|
||||
ver = datetime.datetime.strptime(str(version), '%Y-%m-%d').date()
|
||||
verstr = datetime.datetime.strftime(ver, '%d%b%Y')
|
||||
return "http://www.acme.com/software/http_load/http_load-{0}.tar.gz".format(verstr)
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
makefile = FileFilter("Makefile")
|
||||
makefile.filter("BINDIR =\t/usr/local/bin",
|
||||
"BINDIR = {0}/bin".format(self.prefix))
|
||||
makefile.filter("MANDIR =\t/usr/local/man/man1",
|
||||
"MANDIR={0}/man/man1".format(self.prefix))
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(prefix.bin)
|
||||
mkdirp(prefix.man.man1)
|
||||
make('install')
|
Loading…
Reference in a new issue