20 Star 0 Fork 11

openEuler-RISC-V / toolbox

forked from src-openEuler / toolbox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
toolbox.spec 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
lauk 提交于 2022-12-09 15:41 . Modifying the readme
Name: toolbox
Version: 0.0.99
%global goipath github.com/containers/%{name}
Release: 4
Summary: Unprivileged development environment
License: Apache-2.0
URL: https://github.com/containers/toolbox
Source0: toolbox-0.0.99.3.tar.xz
Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz
Patch0: 0001-fix-wrong-path-of-os-release.patch
BuildRequires: golang >= 1.13 meson
BuildRequires: pkgconfig(bash-completion) systemd
Requires: podman >= 1.4.0
%description
Toolbox is a tool for Linux operating systems, which allows the use of
containerized command line environments. It is built on top of Podman and
other standard container technologies from OCI.
%package tests
Summary: Tests for toolbox.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tests
The toolbox-tests package contains system tests for toolbox.
%prep
%setup -q
%patch0 -p 1
GOBUILDDIR="$(pwd)/_build"
GOSOURCEDIR="$(pwd)"
if [[ ! -e "$GOBUILDDIR/bin" ]] ; then
install -m 0755 -vd "$GOBUILDDIR/bin"
fi
if [[ ! -e "$GOBUILDDIR/src/%{goipath}" ]] ; then
install -m 0755 -vd "$(dirname $GOBUILDDIR/src/%{goipath})"
ln -fs "$GOSOURCEDIR" "$GOBUILDDIR/src/%{goipath}"
fi
cd "$GOBUILDDIR/src/%{goipath}"
tar -xf %SOURCE1
%build
GO_MD2MAN_PATH="$(pwd)%{_bindir}"
mkdir -p _build/bin $GO_MD2MAN_PATH
cd go-md2man-*
go build -mod=vendor -o ../_build/bin/go-md2man .
cp ../_build/bin/go-md2man $GO_MD2MAN_PATH/go-md2man
export PATH=$GO_MD2MAN_PATH:$PATH
cd -
export GO111MODULE=off
GOBUILDDIR="$(pwd)/_build"
export GOPATH="$GOBUILDDIR:%{gopath}"
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
ln -s src/cmd cmd
ln -s src/pkg pkg
ln -s src/vendor vendor
%meson --buildtype=plain -Dprofile_dir=%{_sysconfdir}/profile.d
%meson_build
%install
%meson_install
%files
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
%license COPYING
%{_bindir}/%{name}
%{_datadir}/bash-completion
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}-*.1*
%{_sysconfdir}/profile.d/%{name}.sh
%{_tmpfilesdir}/%{name}.conf
%files tests
%{_datadir}/%{name}
%changelog
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.99-4
- License compliance rectification
* Thu Sep 15 2022 duyiwei <duyiwei@kylinos.cn> - 0.0.99-3
- change /usr/lib/os-release to /etc/os-release
* Tue Jun 07 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.99.3-2
- update Source0
* Thu Feb 10 2022 duyiwei <duyiwei@kylinos.cn> - 0.0.99.3-1
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/toolbox.git
git@gitee.com:openeuler-risc-v/toolbox.git
openeuler-risc-v
toolbox
toolbox
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891