Created
December 21, 2023 14:39
-
-
Save pvalena/34ed6a701534aec2bf68f7f43446f024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- rubygem-formatador/.generated.spec 2023-12-21 15:37:22.628105387 +0100 | |
+++ rubygem-formatador/rubygem-formatador.spec 2023-11-16 18:34:35.930447000 +0100 | |
@@ -1,18 +1,19 @@ | |
-Downloaded formatador-1.1.0 | |
-# Generated from formatador-1.1.0.gem by gem2rpm -*- rpm-spec -*- | |
%global gem_name formatador | |
+%{!?_with_bootstrap: %global bootstrap 0} | |
+ | |
Name: rubygem-%{gem_name} | |
Version: 1.1.0 | |
Release: 1%{?dist} | |
Summary: Ruby STDOUT text formatting | |
License: MIT | |
-URL: https://github.com/geemus/formatador | |
+URL: http://github.com/geemus/formatador | |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | |
BuildRequires: ruby(release) | |
BuildRequires: rubygems-devel | |
-BuildRequires: ruby | |
-# BuildRequires: rubygem(shindo) | |
+%if ! 0%{?bootstrap} | |
+BuildRequires: rubygem(shindo) | |
+%endif | |
BuildArch: noarch | |
%description | |
@@ -28,15 +29,10 @@ | |
Documentation for %{name}. | |
%prep | |
-%setup -q -n %{gem_name}-%{version} | |
+%setup -q -c -T | |
+%gem_install -n %{SOURCE0} | |
%build | |
-# Create the gem as gem install only works on a gem file | |
-gem build ../%{gem_name}-%{version}.gemspec | |
- | |
-# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir | |
-# by default, so that we can move it into the buildroot in %%install | |
-%gem_install | |
%install | |
mkdir -p %{buildroot}%{gem_dir} | |
@@ -43,12 +39,14 @@ | |
cp -a .%{gem_dir}/* \ | |
%{buildroot}%{gem_dir}/ | |
- | |
- | |
%check | |
+%if ! 0%{?bootstrap} | |
pushd .%{gem_instdir} | |
-# shindont | |
+# if we don't use -Ilib, the already installed (perhaps older) gem will be used | |
+# but we want to test the actually packaged | |
+RUBYOPT=-Ilib shindo | |
popd | |
+%endif | |
%files | |
%dir %{gem_instdir} | |
@@ -61,13 +59,108 @@ | |
%doc %{gem_docdir} | |
%doc %{gem_instdir}/CONTRIBUTING.md | |
%doc %{gem_instdir}/CONTRIBUTORS.md | |
-%{gem_instdir}/Gemfile | |
%doc %{gem_instdir}/README.md | |
+%{gem_instdir}/Gemfile | |
%{gem_instdir}/Rakefile | |
%doc %{gem_instdir}/changelog.txt | |
%{gem_instdir}/formatador.gemspec | |
%{gem_instdir}/tests | |
%changelog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment