# # Conditional build: %bcond_without tests # build without tests %define pkgname iniparse Summary: A pure Ruby library for parsing INI documents Name: ruby-%{pkgname} Version: 1.4.4 Release: 2 License: MIT Group: Development/Languages Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem # Source0-md5: 5ff1df1b63031f4a2a8343a2fbe4f630 URL: http://github.com/antw/iniparse BuildRequires: rpm-rubyprov BuildRequires: rpmbuild(macros) >= 1.656 %if %{with tests} BuildRequires: ruby-rspec < 4 BuildRequires: ruby-rspec >= 3.4 %endif BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description A pure Ruby library for parsing INI documents. Preserves the structure of the original document, including whitespace and comments. %prep %setup -q -n %{pkgname}-%{version} %build # write .gemspec %__gem_helper spec %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}} cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %{ruby_vendorlibdir}/%{pkgname}.rb %{ruby_vendorlibdir}/%{pkgname} %{ruby_specdir}/%{pkgname}-%{version}.gemspec