You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-scanf/SPECS/rubygem-scanf.spec

84 lines
2.0 KiB

## START: Set by rpmautospec
## (rpmautospec version 0.2.6)
%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
## END: Set by rpmautospec
%global gem_name scanf
Name: rubygem-%{gem_name}
Version: 1.0.0
Release: %autorelease
Summary: A Ruby implementation of the C function scanf(3)
License: BSD
URL: https://github.com/ruby/scanf
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# License is not included in the gem, copied from git
Source1: LICENSE.txt
# Tests are not included in the gem, copied from git
Source2: data.txt
Source3: test_scanf.rb
Source4: test_scanfblocks.rb
Source5: test_scanfio.rb
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.3.0
# Required for %check
BuildRequires: rubygem(test-unit)
BuildArch: noarch
%description
A Ruby implementation of the C function scanf(3).
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version}
cp %{SOURCE1} LICENSE.txt
%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}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
ruby -I.%{gem_instdir}/lib %{SOURCE3} %{SOURCE4} %{SOURCE5}
%files
%license LICENSE.txt
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%changelog
* Sun Sep 01 2024 Eduard Basov <ebasov@msvsphere-os.ru> - 1.0.0-1
- Rebuilt for MSVSphere 9.4
* Fri Apr 22 2022 Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl> 1.0.0-1
- Initial package