From 3924e6299238daaace552aaf8ab82b10fdeecaab Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Wed, 5 Feb 2014 21:32:06 -0700 Subject: initial package import --- rubygem-rinku.spec | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 rubygem-rinku.spec (limited to 'rubygem-rinku.spec') diff --git a/rubygem-rinku.spec b/rubygem-rinku.spec new file mode 100644 index 0000000..d99a346 --- /dev/null +++ b/rubygem-rinku.spec @@ -0,0 +1,85 @@ +%global gem_name rinku + +Name: rubygem-%{gem_name} +Version: 1.7.3 +Release: 1%{?dist} +Summary: Autolinking for Ruby +Group: Development/Languages +License: ISC +URL: https://github.com/vmg/rinku +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby +Requires: ruby(rubygems) +BuildRequires: ruby +BuildRequires: rubygems-devel +BuildRequires: ruby-devel +BuildRequires: rubygem(minitest) +Provides: rubygem(%{gem_name}) = %{version} + +%description +A fast and very smart autolinking library that acts as a drop-in replacement +for Rails `auto_link`. + + +%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 + +# Remove unnecessary Rakefile +rm Rakefile +sed -i "s|\"Rakefile\",||g" %{gem_name}.gemspec + +%build +# Create the gem as gem install only works on a gem file +gem build %{gem_name}.gemspec + +%gem_install + +# Remove unnecessary gemspec file +rm .%{gem_instdir}/%{gem_name}.gemspec + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +# Remove deprecated "ext" directory +rm -r %{buildroot}%{gem_instdir}/ext + +# Move the binary extension +mkdir -p %{buildroot}%{gem_extdir_mri}/lib +mv %{buildroot}%{gem_libdir}/rinku.so %{buildroot}%{gem_extdir_mri}/lib/ + +%check +pushd .%{gem_instdir} + ruby -Ilib test/autolink_test.rb +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/COPYING +%doc %{gem_instdir}/README.markdown +%{gem_libdir} +%{gem_extdir_mri} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%exclude %{gem_instdir}/test + +%changelog +* Wed Feb 05 2014 Ken Dreyer - 1.7.3-1 +- Initial package -- cgit