summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-12-26 21:05:15 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-12-26 21:26:40 -0700
commit128ca61d0bb173d547c2c3773499d1dae9f0f438 (patch)
treea596a420139bc7200f3acc89d8c6c40dd2b3f95c
parent1e3db58698cb4dfdbf9eef8d174bec884f1734a9 (diff)
downloadrubygem-yajl-ruby-128ca61d0bb173d547c2c3773499d1dae9f0f438.tar.gz
rubygem-yajl-ruby-128ca61d0bb173d547c2c3773499d1dae9f0f438.tar.xz
rubygem-yajl-ruby-128ca61d0bb173d547c2c3773499d1dae9f0f438.zip
remove developer-only files during %prep
Some files were deleted during %install, some files were %exclude'd, and some were shipped in -doc. Just delete them all during %prep for cleanliness and consistency.
-rw-r--r--rubygem-yajl-ruby.spec14
1 files changed, 7 insertions, 7 deletions
diff --git a/rubygem-yajl-ruby.spec b/rubygem-yajl-ruby.spec
index d1caae8..f346fc2 100644
--- a/rubygem-yajl-ruby.spec
+++ b/rubygem-yajl-ruby.spec
@@ -51,6 +51,13 @@ gem unpack %{SOURCE0}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+# Remove developer-only files.
+# https://github.com/brianmario/yajl-ruby/issues/103
+for f in .gitignore .rspec .travis.yml Gemfile Rakefile; do
+ rm $f
+ sed -i "s|\"$f\",||g" %{gem_name}.gemspec
+done
+
%build
gem build %{gem_name}.gemspec
@@ -75,9 +82,6 @@ cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
# Remove the binary extension sources and build leftovers.
rm -rf %{buildroot}%{gem_instdir}/ext
-# Remove other cruft from the gem
-rm %{buildroot}%{gem_instdir}/.gitignore \
- %{buildroot}%{gem_instdir}/.travis.yml
%if 0%{?el6}
# %%{gem_extdir_mri} doesn't really work on EL 6
mkdir -p %{buildroot}%{ruby_sitearch}/yajl
@@ -113,15 +117,11 @@ popd
%endif
%{gem_libdir}
%{gem_spec}
-# https://github.com/brianmario/yajl-ruby/issues/103
-%exclude %{gem_instdir}/.rspec
%exclude %{gem_cache}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
-%{gem_instdir}/Gemfile
-%{gem_instdir}/Rakefile
%{gem_instdir}/benchmark
%{gem_instdir}/examples
%{gem_instdir}/spec