|
|
204dbc |
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
|
204dbc |
%{!?scl:%global pkg_name %{name}}
|
|
|
204dbc |
|
|
|
204dbc |
%global gem_name bundler
|
|
|
204dbc |
|
|
|
204dbc |
%{!?enable_test: %global enable_test 0}
|
|
|
204dbc |
|
|
|
204dbc |
Summary: Library and utilities to manage a Ruby application's gem dependencies
|
|
|
204dbc |
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
|
204dbc |
Version: 1.3.5
|
|
|
204dbc |
Release: 1%{?dist}
|
|
|
204dbc |
Group: Development/Languages
|
|
|
204dbc |
License: MIT
|
|
|
204dbc |
URL: http://gembundler.com
|
|
|
204dbc |
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
204dbc |
Patch1: bundler-add-support-for-binary-extensions-in-dedicated-folde.patch
|
|
|
204dbc |
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
|
204dbc |
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
204dbc |
Requires: %{?scl_prefix}rubygem(thor)
|
|
|
204dbc |
Requires: %{?scl_prefix}rubygem(net-http-persistent)
|
|
|
204dbc |
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
|
204dbc |
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
|
204dbc |
BuildRequires: %{?scl_prefix_ruby}ruby
|
|
|
204dbc |
%if 0%{enable_test} > 0
|
|
|
204dbc |
BuildRequires: %{?scl_prefix_ruby}ruby-devel
|
|
|
204dbc |
BuildRequires: %{?scl_prefix}rubygem(thor)
|
|
|
204dbc |
BuildRequires: %{?scl_prefix}rubygem(net-http-persistent)
|
|
|
204dbc |
BuildRequires: %{?scl_prefix}rubygem(rspec)
|
|
|
204dbc |
BuildRequires: git sudo
|
|
|
204dbc |
%endif
|
|
|
204dbc |
BuildArch: noarch
|
|
|
204dbc |
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
|
204dbc |
|
|
|
204dbc |
%description
|
|
|
204dbc |
Bundler manages an application's dependencies through its entire life, across
|
|
|
204dbc |
many machines, systematically and repeatably
|
|
|
204dbc |
|
|
|
204dbc |
%package doc
|
|
|
204dbc |
Summary: Documentation for %{pkg_name}
|
|
|
204dbc |
Group: Documentation
|
|
|
204dbc |
Requires:%{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
|
204dbc |
|
|
|
204dbc |
%description doc
|
|
|
204dbc |
Documentation for %{pkg_name}
|
|
|
204dbc |
|
|
|
204dbc |
|
|
|
204dbc |
%prep
|
|
|
204dbc |
%setup -n %{pkg_name}-%{version} -q -c -T
|
|
|
204dbc |
mkdir -p .%{gem_dir}
|
|
|
204dbc |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
204dbc |
%gem_install -n %{SOURCE0}
|
|
|
204dbc |
%{?scl:EOF}
|
|
|
204dbc |
|
|
|
204dbc |
pushd .%{gem_instdir}
|
|
|
204dbc |
%patch1 -p1
|
|
|
204dbc |
popd
|
|
|
204dbc |
|
|
|
204dbc |
%build
|
|
|
204dbc |
|
|
|
204dbc |
%install
|
|
|
204dbc |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
204dbc |
cp -a .%{gem_dir}/* \
|
|
|
204dbc |
%{buildroot}%{gem_dir}/
|
|
|
204dbc |
|
|
|
204dbc |
mkdir -p %{buildroot}/%{_bindir}
|
|
|
204dbc |
cp -a .%{_bindir}/* \
|
|
|
204dbc |
%{buildroot}%{_bindir}/
|
|
|
204dbc |
|
|
|
204dbc |
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
204dbc |
find %{buildroot}%{gem_instdir}/lib/bundler/templates/newgem/bin -type f | xargs chmod 755
|
|
|
204dbc |
chmod 755 %{buildroot}%{gem_instdir}/lib/bundler/templates/Executable*
|
|
|
204dbc |
|
|
|
204dbc |
# Remove bundled libraries
|
|
|
204dbc |
rm -rf %{buildroot}/%{gem_libdir}/bundler/vendor
|
|
|
204dbc |
|
|
|
204dbc |
# Man pages are used by Bundler internally, do not remove them!
|
|
|
204dbc |
mkdir -p %{buildroot}%{_mandir}/man5
|
|
|
204dbc |
cp -a %{buildroot}%{gem_libdir}/bundler/man/gemfile.5 %{buildroot}%{_mandir}/man5
|
|
|
204dbc |
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
204dbc |
for i in bundle bundle-config bundle-exec bundle-install bundle-package bundle-update
|
|
|
204dbc |
do
|
|
|
204dbc |
cp -a %{buildroot}%{gem_libdir}/bundler/man/$i %{buildroot}%{_mandir}/man1/`echo $i.1`
|
|
|
204dbc |
done
|
|
|
204dbc |
|
|
|
204dbc |
# Test suite has to be disabled for official build, since it downloads various
|
|
|
204dbc |
# gems, which are not in Fedora or they have different version etc.
|
|
|
204dbc |
# Nevertheless, the test suite passes for local builds.
|
|
|
204dbc |
%if 0%{enable_test} > 0
|
|
|
204dbc |
%check
|
|
|
204dbc |
pushd .%{gem_instdir}
|
|
|
204dbc |
|
|
|
204dbc |
# This test does not work, since ruby is configured with --with-ruby-version=''
|
|
|
204dbc |
# https://github.com/carlhuda/bundler/issues/2365
|
|
|
204dbc |
sed -i '/"works after switching Rubies"/,/end$/{s/^/#/}' spec/install/gems/platform_spec.rb
|
|
|
204dbc |
|
|
|
204dbc |
# Test suite needs to run in initialized git repository.
|
|
|
204dbc |
# https://github.com/carlhuda/bundler/issues/2022
|
|
|
204dbc |
git init
|
|
|
204dbc |
|
|
|
204dbc |
# LANG=en_US.utf-8 prevents test suite failure caused by RubyGems issue:
|
|
|
204dbc |
# https://github.com/rubygems/rubygems/issues/314
|
|
|
204dbc |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
204dbc |
|
|
|
204dbc |
# There is necessary to specify load paths for several gems to pass the test
|
|
|
204dbc |
# suite. Let's evaluate them by this nice Ruby snippet.
|
|
|
204dbc |
RUBYOPT=-I`ruby <
|
|
|
204dbc |
specs = %w{json rdoc psych}.map {|g| Gem::Specification.find_by_name(g)}
|
|
|
204dbc |
specs.map! do |s|
|
|
|
204dbc |
paths = [s.gem_dir]
|
|
|
204dbc |
paths << s.ext_dir unless s.extensions.empty?
|
|
|
204dbc |
paths.map {|p| File.join p, s.require_paths.first}
|
|
|
204dbc |
end
|
|
|
204dbc |
puts specs.join(':')
|
|
|
204dbc |
EOF` rspec spec/
|
|
|
204dbc |
%{?scl:EOF}
|
|
|
204dbc |
|
|
|
204dbc |
%endif
|
|
|
204dbc |
|
|
|
204dbc |
%files
|
|
|
204dbc |
%dir %{gem_instdir}
|
|
|
204dbc |
%exclude %{gem_instdir}/.*
|
|
|
204dbc |
%exclude %{gem_instdir}/man
|
|
|
204dbc |
%{gem_libdir}
|
|
|
204dbc |
%doc %{gem_instdir}/LICENSE.md
|
|
|
204dbc |
%{gem_instdir}/.travis.yml
|
|
|
204dbc |
%{_bindir}/bundle
|
|
|
204dbc |
%{gem_instdir}/bin
|
|
|
204dbc |
%exclude %{gem_cache}
|
|
|
204dbc |
%{gem_spec}
|
|
|
204dbc |
%doc %{_mandir}/man1/*
|
|
|
204dbc |
%doc %{_mandir}/man5/*
|
|
|
204dbc |
|
|
|
204dbc |
%files doc
|
|
|
204dbc |
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
204dbc |
%doc %{gem_instdir}/ISSUES.md
|
|
|
204dbc |
%doc %{gem_instdir}/README.md
|
|
|
204dbc |
%doc %{gem_instdir}/UPGRADING.md
|
|
|
204dbc |
%{gem_instdir}/Rakefile
|
|
|
204dbc |
%{gem_instdir}/spec
|
|
|
204dbc |
%{gem_instdir}/%{gem_name}.gemspec
|
|
|
204dbc |
%doc %{gem_docdir}
|
|
|
204dbc |
%doc %{gem_instdir}/CONTRIBUTE.md
|
|
|
204dbc |
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
204dbc |
|
|
|
204dbc |
%changelog
|
|
|
204dbc |
* Mon Oct 21 2013 Josef Stribny <jstribny@redhat.com> - 1.3.5-1
|
|
|
204dbc |
- Update to bundler 1.3.5
|
|
|
204dbc |
|
|
|
204dbc |
* Thu Jun 06 2013 Josef Stribny <jstribny@redhat.com> - 1.1.4-4
|
|
|
204dbc |
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
|
|
204dbc |
|
|
|
204dbc |
* Thu Jul 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.4-3
|
|
|
204dbc |
- Imported from Fedora again.
|
|
|
204dbc |
- Specfile cleanup
|
|
|
204dbc |
|
|
|
204dbc |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
|
|
|
204dbc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
204dbc |
|
|
|
204dbc |
* Fri Jul 13 2012 Vít Ondruch <vondruch@redhat.com> - 1.1.4-1
|
|
|
204dbc |
- Update to Bundler 1.1.4.
|
|
|
204dbc |
|
|
|
204dbc |
* Wed Feb 01 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.21-1
|
|
|
204dbc |
- Rebuilt for Ruby 1.9.3.
|
|
|
204dbc |
- Update to Bundler 1.0.21.
|
|
|
204dbc |
|
|
|
204dbc |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.15-2
|
|
|
204dbc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
204dbc |
|
|
|
204dbc |
* Thu Jul 07 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.15-1
|
|
|
204dbc |
- Updated to Bundler 1.0.15
|
|
|
204dbc |
|
|
|
204dbc |
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-2
|
|
|
204dbc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
204dbc |
|
|
|
204dbc |
* Fri Feb 04 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.10-1
|
|
|
204dbc |
- Upstream update
|
|
|
204dbc |
|
|
|
204dbc |
* Thu Jan 27 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.9-2
|
|
|
204dbc |
- More concise summary
|
|
|
204dbc |
- Do not remove manpages, they are used internally
|
|
|
204dbc |
- Added buildroot cleanup in clean section
|
|
|
204dbc |
|
|
|
204dbc |
* Mon Jan 24 2011 Vít Ondruch <vondruch@redhat.com> - 1.0.9-1
|
|
|
204dbc |
- Bumped to Bundler 1.0.9
|
|
|
204dbc |
- Installed manual pages
|
|
|
204dbc |
- Removed obsolete buildroot cleanup
|
|
|
204dbc |
|
|
|
204dbc |
* Mon Nov 1 2010 Jozef Zigmund <jzigmund@redhat.com> - 1.0.3-2
|
|
|
204dbc |
- Add ruby(abi) dependency
|
|
|
204dbc |
- Add using macro %%{geminstdir} in files section
|
|
|
204dbc |
- Add subpackage doc for doc files
|
|
|
204dbc |
- Removed .gitignore file
|
|
|
204dbc |
- Removed rubygem-thor from vendor folder
|
|
|
204dbc |
- Add dependency rubygem(thor)
|
|
|
204dbc |
|
|
|
204dbc |
* Mon Oct 18 2010 Jozef Zigmund <jzigmund@redhat.com> - 1.0.3-1
|
|
|
204dbc |
- Initial package
|