diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..19ed676 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/test-unit-ruby-core-*.gem +/test-unit-ruby-core-*-additional.tar.gz diff --git a/rubygem-test-unit-ruby-core.spec b/rubygem-test-unit-ruby-core.spec new file mode 100644 index 0000000..77e6308 --- /dev/null +++ b/rubygem-test-unit-ruby-core.spec @@ -0,0 +1,72 @@ +%global gem_name test-unit-ruby-core + +Name: rubygem-%{gem_name} +Version: 1.0.1 +Release: 2%{?dist} + +Summary: Additional test assertions for Ruby standard libraries +# SPDX confirmed +License: BSD-2-Clause +URL: https://github.com/ruby/test-unit-ruby-core + +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: %{gem_name}-%{version}-additional.tar.gz +# Source1 is created by $ bash %%SOURCE2 %%version +Source2: test-unit-ruby-core-create-missing-files.sh +BuildRequires: ruby(release) +BuildRequires: rubygems-devel + +BuildArch: noarch + +%description +Additional test assertions for Ruby standard libraries. + +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name}. + +%prep +%setup -q -n %{gem_name}-%{version} -b 1 + +%build +gem build ../%{gem_name}-%{version}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +# Install additional files +cp -a \ + LICENSE.txt \ + README.md \ + %{buildroot}%{gem_instdir}/ + +rm -f %{buildroot}%{gem_cache} + +%check +# No available test suite currently +exit 0 + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/README.md +%license %{gem_instdir}/LICENSE.txt +%{gem_libdir} +%{gem_spec} + +%files doc +%doc %{gem_docdir} + + +%changelog +* Fri Jul 7 2023 Mamoru TASAKA - 1.0.1-2 +- Fix comment for source + +* Thu Jun 22 2023 Mamoru TASAKA - 1.0.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..d38597c --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (test-unit-ruby-core-1.0.1.gem) = 1e97309e7ad83036d660e958fef8c836a887615fe694208b1f7133e6287c978d530fbeeaaa09052fa7b4113b72bd8a04f55960a13fce2a7ad458b0c518377221 +SHA512 (test-unit-ruby-core-1.0.1-additional.tar.gz) = a678c5cbb91eb6c177b0320bc9d2f7455709394514f6802bfb066345f975d5ad321217951c95965abcb4dd5a8277a9e295e4b335cd304ff2d67a2ed192e704b1 diff --git a/test-unit-ruby-core-create-missing-files.sh b/test-unit-ruby-core-create-missing-files.sh new file mode 100644 index 0000000..532bfb3 --- /dev/null +++ b/test-unit-ruby-core-create-missing-files.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if [ $# -lt 1 ] +then + echo "$0 " + exit 1 +fi + +set -x +set -e + +VERSION=$1 + +REPOURL=https://github.com/ruby/ +REPONAME=test-unit-ruby-core + +TARBALLNAME=${REPONAME}-${VERSION}-additional.tar.gz + +CURRDIR=$(pwd) +TMPDIRPATH=$(mktemp -d /var/tmp/${REPONAME}-tar-XXXXXX) +pushd $TMPDIRPATH + +git clone ${REPOURL}/${REPONAME}.git +ln -sf ${REPONAME} ${REPONAME}-${VERSION} +cd ${REPONAME} + +git checkout -b fedora-${VERSION} v${VERSION} +cd .. +tar czf $TARBALLNAME \ + ${REPONAME}-${VERSION}/LICENSE.txt \ + ${REPONAME}-${VERSION}/README.md \ + +mv $TARBALLNAME $CURRDIR + +popd +rm -rf $TMPDIRPATH + +