rubygem-rack/rubygem-rack.spec

83 lines
2.2 KiB
RPMSpec
Raw Normal View History

2020-03-06 20:11:55 +08:00
%global gem_name rack
Name: rubygem-rack
Version: 2.0.4
Epoch: 1
2020-09-17 12:51:08 +08:00
Release: 2
2020-03-06 20:11:55 +08:00
Summary: A modular Ruby webserver interface
License: MIT and BSD
URL: https://github.com/rack/rack
2020-09-17 12:51:08 +08:00
Source0: https://rubygems.org/downloads/rack-%{version}.gem
2020-03-06 20:11:55 +08:00
BuildRequires: rubygems-devel ruby
BuildArch: noarch
%description
Rack provides a minimal, modular, and adaptable interface for developing
web applications in Ruby. By wrapping HTTP requests and responses in the
simplest way possible, it unifies and distills the API for web servers,
web frameworks, and software in between (the so-called middleware) into
a single method call.
%package help
Summary: Documents for %{name}
Buildarch: noarch
Requires: man info %{name} = %{epoch}:%{version}-%{release}
Provides: %{name}-doc = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-doc < %{epoch}:%{version}-%{release}
%description help
Man pages and other related documents for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
%build
%install
install -d 0755 %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
install -d 0755 %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* %{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
find %{buildroot}%{gem_instdir}/{bin,test/cgi} -type f | \
xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|'
for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do
[ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
done
for file in `find %{buildroot}%{gem_instdir} -type f`; do
[ ! -z "`head -n 1 $file | grep \"^#!\"`" ] && chmod -v 755 $file
done
%files
%defattr(-,root,root)
%license %{gem_instdir}/COPYING
%{_bindir}/rackup
%dir %{gem_instdir}
%{gem_libdir}
%{gem_instdir}/bin
%{gem_spec}
%exclude %{gem_cache}
%files help
%defattr(-,root,root)
%doc %{gem_docdir}
%doc %{gem_instdir}/example
%doc %{gem_instdir}/contrib
%doc %{gem_instdir}/HISTORY.md
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/SPEC
%{gem_instdir}/test
%{gem_instdir}/Rakefile
%{gem_instdir}/%{gem_name}.gemspec
%changelog
2020-09-17 12:51:08 +08:00
* Wed Sep 9 2020 Ge Wang <wangge20@huawei.com> - 1:2.0.4-2
- Modify Source0 Url
2020-03-06 20:11:55 +08:00
* Thu Mar 5 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:2.0.4-1
- Package init