%global debug_package %{nil} %define tempdir github.com/openSUSE/umoci Name: umoci Version: 0.4.7 Release: 3 Summary: Open Container Image manipulation tool License: ISC and MIT and Apache-2.0 URL: https://github.com/opencontainers/umoci Source0: https://github.com/opencontainers/umoci/archive/v0.4.7.tar.gz Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz Source2: sys.tar.gz Patch0000: fix-bad-build-flags.patch BuildRequires: fdupes go >= 1.6 %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. %package_help %prep %autosetup -n %{name}-%{version} -p1 tar -xf %SOURCE1 %ifarch loongarch64 rm -rf vendor/golang.org/x/sys tar -xf %{SOURCE2} -C vendor/golang.org/x %endif %build cd go-md2man-* go build -mod=vendor -o go-md2man . export GO_MD2MAN=$(realpath go-md2man) cd - export GOPATH=$HOME/go mkdir -pv $HOME/go/src/%{tempdir} rm -rf $HOME/go/src/%{tempdir}/* cp -ar * $HOME/go/src/%{tempdir} make umoci make docs %install install -D -m 0755 %{name} %{buildroot}/%{_bindir}/%{name} %fdupes %{buildroot} for man_file in doc/man/*.1; do install -D -m 0644 $man_file %{buildroot}/%{_mandir}/man1/$(basename $man_file) done %files %defattr(-,root,root) %license COPYING %{_bindir}/%{name} %files help %doc README.md doc/* CHANGELOG.md %{_mandir}/man1/umoci* %changelog * Tue Jul 11 2023 Wenlong Zhang - 0.4.7-3 - add loong64 support for umoci * Tue Feb 15 2022 caodongxia - 0.4.7-2 - fix bad build flags * Tue Jan 18 2022 SimpleUpdate Robot - 0.4.7-1 - Upgrade to version 0.4.7 * Fri Apr 16 2021 wangyue - 0.4.5-5 - Fix CVE-2021-29136 * Tue Feb 9 2021 lingsheng - 0.4.5-4 - Fix unresolvable * Wed Sep 9 2020 Ge Wang - 0.4.5-3 - Modify Source0 Url * Wed Mar 18 2020 openEuler Buildteam - 0.4.5-2 - Package init