diff --git a/toolbox-0.0.99-vendored.tar.xz b/toolbox-0.0.99-vendored.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..95f814360bdc793ba72d82bc0041396f4535095c Binary files /dev/null and b/toolbox-0.0.99-vendored.tar.xz differ diff --git a/toolbox.spec b/toolbox.spec new file mode 100644 index 0000000000000000000000000000000000000000..31b53c3ca50425d7f404d291143dd87a8c0eac85 --- /dev/null +++ b/toolbox.spec @@ -0,0 +1,91 @@ +Name: toolbox +Version: 0.0.99 + +%global goipath github.com/containers/%{name} + +Release: 1 +Summary: Unprivileged development environment + +License: ASL 2.0 +URL: https://github.com/containers/toolbox + +Source0: toolbox-0.0.99-vendored.tar.xz +Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz + +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 + +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 +* Thu Feb 10 2022 duyiwei - 0.0.99-1 +- Package init \ No newline at end of file diff --git a/v1.0.10.tar.gz b/v1.0.10.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c6b658ca85114774c8b6b3d80ff9c210e863564d Binary files /dev/null and b/v1.0.10.tar.gz differ