Update to umoci 0.0.0~rc3 OBS-URL: https://build.opensuse.org/request/show/447020 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/umoci?expand=0&rev=2
99 lines
2.6 KiB
RPMSpec
99 lines
2.6 KiB
RPMSpec
#
|
|
# spec file for package umoci
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
# nodebuginfo
|
|
|
|
# Handle all Go arches.
|
|
%{!?go_arches: %global go_arches %ix86 x86_64 aarch64 ppc64le}
|
|
|
|
# Remove stripping of Go binaries.
|
|
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
|
|
|
|
Name: umoci
|
|
Version: 0.0.0~rc3
|
|
Release: 0
|
|
Summary: Open Container Image manipulation tool
|
|
License: Apache-2.0
|
|
Group: System/Management
|
|
Url: https://github.com/cyphar/umoci
|
|
Source: %{name}-%{version}.tar.xz
|
|
%ifarch %{go_arches}
|
|
BuildRequires: go >= 1.6
|
|
BuildRequires: go-go-md2man
|
|
%else
|
|
BuildRequires: gcc6-go >= 6.1
|
|
%endif
|
|
BuildRequires: fdupes
|
|
BuildRoot: %{_tmppath}/%{name}-%{raw_version}-build
|
|
%if 0%{?is_opensuse}
|
|
ExcludeArch: s390x
|
|
%endif
|
|
|
|
%description
|
|
umoci modifies Open Container images.
|
|
|
|
umoci intends to be a complete manipulation tool for OCI images. In particular,
|
|
it should be seen as a more end-user-focused version of the oci-image-tools
|
|
provided by the OCI. The hope is that all of this tooling will eventually be
|
|
merged with the upstream repository, so that it is always kept up-to-date by
|
|
the Open Container Initiative community.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
|
|
mkdir -p .gopath/src/github.com/cyphar
|
|
ln -s $PWD .gopath/src/github.com/cyphar/umoci
|
|
export GOPATH=$PWD/.gopath
|
|
export VERSION="$(cat ./VERSION)"
|
|
if [ "$VERSION" != "%{version}" ]; then
|
|
VERSION+="-%{version}"
|
|
fi
|
|
|
|
# Build the binary.
|
|
make VERSION="$VERSION" umoci
|
|
|
|
# Build the docs if we have go-md2man.
|
|
%ifarch %{go_arches}
|
|
make doc
|
|
%endif
|
|
|
|
%install
|
|
# Install the binary.
|
|
%{__install} -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
|
|
|
|
|
|
# Install all of the docs.
|
|
%ifarch %{go_arches}
|
|
for file in man/*.1; do
|
|
%{__install} -D -m 0644 $file "%{buildroot}/%{_mandir}/man1/$(basename $file)"
|
|
done
|
|
%endif
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc COPYING README.md man/*.md
|
|
%{_bindir}/%{name}
|
|
%ifarch %{go_arches}
|
|
%{_mandir}/man1/umoci*
|
|
%endif
|
|
|
|
%changelog
|
|
|