diff options
author | Alex Hedges <aphedges@users.noreply.github.com> | 2022-12-29 04:53:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 10:53:19 +0100 |
commit | d02c71e44345485ea3f9a931a37d8436d7b0363a (patch) | |
tree | 55d5e4a0d6039aed8dae4095bb485b4f4b6c29e2 /var | |
parent | ca6e1788909c62195740b75a7f71a4c6357cebd4 (diff) | |
download | spack-d02c71e44345485ea3f9a931a37d8436d7b0363a.tar.gz spack-d02c71e44345485ea3f9a931a37d8436d7b0363a.tar.bz2 spack-d02c71e44345485ea3f9a931a37d8436d7b0363a.tar.xz spack-d02c71e44345485ea3f9a931a37d8436d7b0363a.zip |
git-filter-repo: add new package (#34690)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/git-filter-repo/package.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/git-filter-repo/package.py b/var/spack/repos/builtin/packages/git-filter-repo/package.py new file mode 100644 index 0000000000..46ca1c5e8d --- /dev/null +++ b/var/spack/repos/builtin/packages/git-filter-repo/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2022 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.package import * + + +class GitFilterRepo(Package): + """Quickly rewrite Git repository history (filter-branch replacement)""" + + homepage = "https://github.com/newren/git-filter-repo" + url = "https://github.com/newren/git-filter-repo/releases/download/v2.34.0/git-filter-repo-2.34.0.tar.xz" + + maintainers = ["aphedges"] + + version("2.38.0", sha256="db954f4cae9e47c6be3bd3161bc80540d44f5379cb9cf9df498f4e019f0a41a9") + version("2.34.0", sha256="b1bf46af1e6a91a54056d0254e480803db8e40f631336c559a1a94d2a08389c4") + + depends_on("git@2.22.0:", type="run") + depends_on("python@3.5:", type="run") + + def install(self, spec, prefix): + new_shebang = "#!{0}\n".format(self.spec["python"].command) + filter_file("^#!/usr/bin/env python3?$", new_shebang, "git-filter-repo") + mkdirp(prefix.bin) + install("git-filter-repo", prefix.bin) + + mkdirp(prefix.share.man.man1) + install("Documentation/man1/git-filter-repo.1", prefix.share.man.man1) |