From 9538889f1c4de2674f4849b6da6d4b68d4ea9b4e Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Mon, 12 Aug 2019 10:28:05 -0600 Subject: packages/skopeo (#12348) * bump eospac version * Revert "bump eospac version" This reverts commit 835b1f822d8c083f6ab9eb17222c00409e8eb3da. * new package: skopeo * address flake8 issues * address adamjstewart's comments * use the Executable class and undocumented 'str' feature for output * Package -> MakefilePackage * add missing build phase * patch -> edit phase --- var/spack/repos/builtin/packages/skopeo/package.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/skopeo/package.py diff --git a/var/spack/repos/builtin/packages/skopeo/package.py b/var/spack/repos/builtin/packages/skopeo/package.py new file mode 100644 index 0000000000..575b58a83c --- /dev/null +++ b/var/spack/repos/builtin/packages/skopeo/package.py @@ -0,0 +1,43 @@ +# Copyright 2013-2019 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 Skopeo(MakefilePackage): + """skopeo is a command line utility that performs various operations on + container images and image repositories.""" + + homepage = "https://github.com/containers/skopeo" + url = "https://github.com/containers/skopeo/archive/v0.1.39.tar.gz" + + version('0.1.39', sha256='e9d70f7f7b891675a816f06a22df0490285ad20eefbd91f5da69ca12f56c29f2') + version('0.1.38', sha256='104ceb9c582dc5c3a49dd1752c4c326bba03f2f801596f089372e831f48ed705') + version('0.1.37', sha256='49c0c1b2c2f32422d3230f827ae405fc554fb34af41a54e59b2121ac1500505d') + version('0.1.36', sha256='42f9b0bf53ae44bc294be400e2c5259f977ffa4d5dbac3576b0b5e23d59791fd') + + depends_on('go') + depends_on('gpgme') + depends_on('libassuan') + depends_on('libgpg-error') + + def edit(self, spec, prefix): + grep = which('grep') + files = grep('-lR', '/etc/containers/', 'vendor', output=str, + env={'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}) + + for f in files.splitlines(): + edit = FileFilter(f) + edit.filter('/etc/containers/', '{0}/etc/containers/'. + format(prefix)) + + def build(self, spec, prefix): + make('binary-local') + + def install(self, spec, prefix): + make('binary-local', 'install', + 'DESTDIR={0}'.format(prefix), + 'PREFIX={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2