|
|
443416c |
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
|
443416c |
%global gemname newgem
|
|
|
443416c |
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
|
|
443416c |
|
|
|
443416c |
%global rubyabi 1.8
|
|
|
443416c |
|
|
|
443416c |
Summary: Bundle Ruby libraries into a RubyGem
|
|
|
443416c |
Name: rubygem-%{gemname}
|
|
|
443416c |
Version: 1.5.2
|
|
|
443416c |
Release: 3%{?dist}
|
|
|
443416c |
Group: Development/Languages
|
|
|
443416c |
License: MIT or LGPLv2+
|
|
|
443416c |
URL: http://newgem.rubyforge.org
|
|
|
443416c |
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
|
|
|
443416c |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
443416c |
Requires: ruby(rubygems)
|
|
|
443416c |
Requires: ruby(abi) = %{rubyabi}
|
|
|
443416c |
# Seemingly not required - filed in
|
|
|
443416c |
# http://github.com/drnic/newgem/issues/issue/8
|
|
|
443416c |
#Requires: rubygem(activesupport)
|
|
|
443416c |
Requires: rubygem(rubigen)
|
|
|
443416c |
Requires: rubygem(hoe)
|
|
|
443416c |
Requires: rubygem(RedCloth)
|
|
|
443416c |
Requires: rubygem(syntax)
|
|
|
443416c |
Requires: rubygem(cucumber)
|
|
|
443416c |
BuildRequires: ruby(rubygems)
|
|
|
443416c |
BuildRequires: ruby(abi) = %{rubyabi}
|
|
|
443416c |
#BuildRequires(check): rubygem(activesupport)
|
|
|
443416c |
BuildRequires(check): rubygem(rubigen), rubygem(hoe),
|
|
|
443416c |
BuildRequires(check): rubygem(RedCloth), rubygem(syntax), rubygem(cucumber)
|
|
|
443416c |
BuildRequires(check): rubygem(rake)
|
|
|
443416c |
BuildArch: noarch
|
|
|
443416c |
Provides: rubygem(%{gemname}) = %{version}
|
|
|
443416c |
|
|
|
443416c |
%description
|
|
|
443416c |
Within this gem, you get one thing - newgem - an executable to create your own
|
|
|
443416c |
gems. Your new gems will include designated folders for Ruby code, test files,
|
|
|
443416c |
executables, and even a default website page for you to explain your project,
|
|
|
443416c |
and which instantly uploads to RubyForge website (which looks just like this
|
|
|
443416c |
one by default).
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
%prep
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
%build
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
%install
|
|
|
443416c |
rm -rf %{buildroot}
|
|
|
443416c |
mkdir -p %{buildroot}%{gemdir}
|
|
|
443416c |
gem install --local --install-dir %{buildroot}%{gemdir} \
|
|
|
443416c |
--force --rdoc %{SOURCE0}
|
|
|
443416c |
mkdir -p %{buildroot}/%{_bindir}
|
|
|
443416c |
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
|
|
|
443416c |
rmdir %{buildroot}%{gemdir}/bin
|
|
|
443416c |
find %{buildroot}%{geminstdir}/bin -type f |xargs chmod a+x
|
|
|
443416c |
|
|
|
443416c |
# Kill crlf
|
|
|
443416c |
sed -s 's/\r//g' -i %{buildroot}%{geminstdir}/README.rdoc \
|
|
|
443416c |
%{buildroot}%{geminstdir}/website/version.js \
|
|
|
443416c |
%{buildroot}%{geminstdir}/website/version-raw.txt \
|
|
|
443416c |
%{buildroot}%{geminstdir}/test/test_helper.rb
|
|
|
443416c |
|
|
|
443416c |
# Don't search environment - we leave the generators alone as someone may want
|
|
|
443416c |
# the env searching.
|
|
|
443416c |
find %{buildroot}%{geminstdir}/{bin,script} -type f | \
|
|
|
443416c |
xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"'
|
|
|
443416c |
|
|
|
443416c |
# Only one minor test fails, reported here
|
|
|
443416c |
# http://github.com/drnic/newgem/issues/#issue/7
|
|
|
443416c |
# Disable the assert for now
|
|
|
443416c |
sed -i '/assert_directory_exists "tasks"/d' \
|
|
|
443416c |
%{buildroot}%{geminstdir}/test/test_newgem_generator.rb
|
|
|
443416c |
|
|
|
443416c |
%clean
|
|
|
443416c |
rm -rf %{buildroot}
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
%check
|
|
|
443416c |
pushd %{buildroot}%{geminstdir}
|
|
|
443416c |
rake test
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
# CAUTION: rpmlint currently generates 8 errors and 2 warnings on this package
|
|
|
443416c |
# due to the templating in the generators. Check the output carefully.
|
|
|
443416c |
%files
|
|
|
443416c |
%defattr(-,root,root,-)
|
|
|
443416c |
%{_bindir}/newgem
|
|
|
443416c |
%dir %{geminstdir}
|
|
|
443416c |
%{geminstdir}/*_generators
|
|
|
443416c |
%{geminstdir}/bin
|
|
|
443416c |
%{geminstdir}/config
|
|
|
443416c |
%{geminstdir}/features
|
|
|
443416c |
%{geminstdir}/lib
|
|
|
443416c |
%{geminstdir}/script
|
|
|
443416c |
%{geminstdir}/website
|
|
|
443416c |
%{geminstdir}/Rakefile
|
|
|
443416c |
%doc %{geminstdir}/TODO.markdown
|
|
|
443416c |
%doc %{geminstdir}/test
|
|
|
443416c |
%doc %{geminstdir}/History.txt
|
|
|
443416c |
%doc %{geminstdir}/Manifest.txt
|
|
|
443416c |
%doc %{geminstdir}/PostInstall.txt
|
|
|
443416c |
%doc %{geminstdir}/README.rdoc
|
|
|
443416c |
%doc %{gemdir}/doc/%{gemname}-%{version}
|
|
|
443416c |
%{gemdir}/cache/%{gemname}-%{version}.gem
|
|
|
443416c |
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
|
|
443416c |
|
|
|
443416c |
|
|
|
443416c |
%changelog
|
|
|
443416c |
* Mon Feb 01 2010 Matthew Kent <mkent@magoazul.com> - 1.5.3-3
|
|
|
443416c |
- Fix License (#504476).
|
|
|
443416c |
- Disable activesupport Requires for now (#504476).
|
|
|
443416c |
|
|
|
443416c |
* Fri Jan 01 2010 Matthew Kent <mkent@magoazul.com> - 1.5.2-2
|
|
|
443416c |
- Drop versioning on requirements as this is a new package.
|
|
|
443416c |
- Drop unused ruby_sitelib macro.
|
|
|
443416c |
- Add a rubyabi macro.
|
|
|
443416c |
- RPM_BUILD_ROOT -> buildroot - use one style of macros.
|
|
|
443416c |
- Fix bin/env ruby searching in bin/newgem.
|
|
|
443416c |
- Remove duplicate hoe dependency.
|
|
|
443416c |
- Add check phase.
|
|
|
443416c |
- Fix another crlf (#504476).
|
|
|
443416c |
- Add note about rpmlint complaints (#504476).
|
|
|
443416c |
|
|
|
443416c |
* Mon Oct 12 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.5.2-1
|
|
|
443416c |
- Newer release
|
|
|
443416c |
|
|
|
443416c |
* Fri Jun 26 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.4.1-3
|
|
|
443416c |
- Get rid of duplicate files (thanks to Mamoru Tasaka)
|
|
|
443416c |
|
|
|
443416c |
* Mon Jun 08 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.4.1-2
|
|
|
443416c |
- Bring tests back
|
|
|
443416c |
- Depend on ruby(abi)
|
|
|
443416c |
- Replace defines with globals
|
|
|
443416c |
- Don't drop the empty USAGE files
|
|
|
443416c |
|
|
|
443416c |
* Fri Jun 05 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.4.1-1
|
|
|
443416c |
- Package generated by gem2rpm
|
|
|
443416c |
- Don't ship tests
|
|
|
443416c |
- Fix end of line encodings
|
|
|
443416c |
- Remove empty files
|
|
|
443416c |
- Fix up License
|