Rewrite spec, update to the modern style

This commit is contained in:
Mamoru TASAKA 2017-03-13 15:15:01 +09:00
commit e23e93029f

View file

@ -1,50 +1,70 @@
%global gem_name parseconfig
%global gem_name parseconfig
Summary: Ruby Configuration File Parser
Name: rubygem-%{gem_name}
Version: 1.0.4
Release: 5%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/derks/ruby-parseconfig
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(rubygems), ruby(release)
BuildRequires: rubygems-devel, rubygem-rspec
BuildRequires: ruby-devel
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
Name: rubygem-%{gem_name}
Version: 1.0.4
Release: 6%{?dist}
Summary: Config File Parser for Standard Unix/Linux Type Config Files
License: MIT
URL: http://github.com/datafolklabs/ruby-parseconfig/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildArch: noarch
%description
ParseConfig provides simple parsing of standard configuration files in the
ParseConfig provides simple parsing of standard configuration files in the
form of 'param = value'. It also supports nested [group] sections.
%prep
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
# pass, nothing to do
gem build %{gem_name}.gemspec
%gem_install
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
%gem_install -n %{SOURCE0} -d %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%clean
rm -rf %{buildroot}
pushd %{buildroot}
rm -rf \
.%{gem_cache} \
%{nil}
%check
pushd .%{gem_instdir}
popd
%files
%defattr(-,root,root,-)
%{gem_cache}
%dir %{gem_instdir}
%doc %{gem_instdir}/Changelog
%doc %{gem_instdir}/README.md
%license %{gem_instdir}/LICENSE
%{gem_libdir}/
%{gem_spec}
%dir %{gem_instdir}
%dir %{gem_libdir}/
%{gem_libdir}/parseconfig.rb
%doc %{gem_docdir}/
%doc %{gem_instdir}/Changelog
%doc %{gem_instdir}/LICENSE
%doc %{gem_instdir}/README.md
%files doc
%doc %{gem_docdir}
%changelog
* Mon Mar 13 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.0.4-6
- Rewrite spec, update to the modern style
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild