diff --git a/rubygem-sinatra.spec b/rubygem-sinatra.spec new file mode 100644 index 0000000..f2f37de --- /dev/null +++ b/rubygem-sinatra.spec @@ -0,0 +1,82 @@ +%global gem_name sinatra +%{?_with_bootstrap: %global bootstrap 1} +Summary: Ruby-based web application framework +Name: rubygem-%{gem_name} +Version: 2.0.3 +Release: 1 +License: MIT +URL: http://www.sinatrarb.com/ +Source0: https://rubygems.org/gems/sinatra-%{version}.gem +Source1: https://github.com/sinatra/sinatra/archive/v%{version}.tar.gz +BuildRequires: rubygems-devel +%if ! 0%{?bootstrap} +BuildRequires: rubygem(rack) >= 2.0 rubygem(rack-protection) = %{version} rubygem(tilt) +BuildRequires: rubygem(mustermann) rubygem(rack-test) rubygem(minitest) > 5 +%endif +Epoch: 1 +BuildArch: noarch +%description +Sinatra is a DSL intended for quickly creating web-applications in Ruby +with minimal effort. + +%package help +Summary: Documentation for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} +%description help +This package contains documentation for %{name}. + +%prep +gem unpack %{SOURCE0} +%setup -q -D -T -n %{gem_name}-%{version} +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +%build +gem build %{gem_name}.gemspec +%gem_install + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -rv .%{gem_dir}/* %{buildroot}%{gem_dir} +sed -i -e 's|^#!/usr/bin/env ruby|#!/usr/bin/ruby|' \ + %{buildroot}%{gem_instdir}/examples/*.rb + +%check +%if ! 0%{?bootstrap} +pushd .%{gem_instdir} +tar xzvf %{SOURCE1} +cd %{gem_name}-%{version} +for FILE in $(grep -rl '^require.*bundler.*' test/); do + sed -i "/^require 'bundler.*'/ s/^/#/" ${FILE} +done +mv test/integration_test.rb{,.disabled} +ruby -e 'Dir.glob "./test/*_test.rb", &method(:require)' +popd +%endif + +%files +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%license %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_instdir}/sinatra.gemspec +%exclude %{gem_cache} +%{gem_spec} + +%files help +%doc %{gem_docdir} +%doc %{gem_instdir}/AUTHORS.md +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/CONTRIBUTING.md +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/MAINTENANCE.md +%doc %{gem_instdir}/README*.md +%{gem_instdir}/Rakefile +%doc %{gem_instdir}/SECURITY.md +%{gem_instdir}/VERSION +%{gem_instdir}/examples + +%changelog +* Sat Aug 22 2020 liyanan - 2.0.3-1 +- package init diff --git a/rubygem-sinatra.yaml b/rubygem-sinatra.yaml new file mode 100644 index 0000000..b60e340 --- /dev/null +++ b/rubygem-sinatra.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/sinatra/sinatra.git +version_control: github +src_repo: sinatra/sinatra +tag_prefix: "^v" +seperator: "." diff --git a/sinatra-2.0.3.gem b/sinatra-2.0.3.gem new file mode 100644 index 0000000..adb06de Binary files /dev/null and b/sinatra-2.0.3.gem differ diff --git a/v2.0.3.tar.gz b/v2.0.3.tar.gz new file mode 100644 index 0000000..b6cdc3e Binary files /dev/null and b/v2.0.3.tar.gz differ