summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2013-12-27 17:45:05 -0700
committerKen Dreyer <ktdreyer@ktdreyer.com>2013-12-27 17:45:05 -0700
commit958a9a76b79e866f5d684eedcc42706b04424bda (patch)
treec3287e89aacf491e1b871eb4bb0046bdb59e8e69
parentcd2ab859f7dc23f3953c28ee17a24bc650538ee9 (diff)
downloadrubygem-gemnasium-parser-958a9a76b79e866f5d684eedcc42706b04424bda.tar.gz
rubygem-gemnasium-parser-958a9a76b79e866f5d684eedcc42706b04424bda.tar.xz
rubygem-gemnasium-parser-958a9a76b79e866f5d684eedcc42706b04424bda.zip
Rearrange %files
- Remove more files during %prep
-rw-r--r--rubygem-gemnasium-parser.spec27
1 files changed, 17 insertions, 10 deletions
diff --git a/rubygem-gemnasium-parser.spec b/rubygem-gemnasium-parser.spec
index 824dd95..c91ffb5 100644
--- a/rubygem-gemnasium-parser.spec
+++ b/rubygem-gemnasium-parser.spec
@@ -2,7 +2,7 @@
Name: rubygem-%{gem_name}
Version: 0.1.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Safely parse Gemfiles and gemspecs
Group: Development/Languages
License: MIT
@@ -40,14 +40,21 @@ gem unpack %{SOURCE0}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+# Remove developer-only files.
+for f in .gitignore .travis.yml Gemfile Rakefile; do
+ rm $f
+ sed -i "s|\"$f\",||g" %{gem_name}.gemspec
+done
+
%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec
-# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
-# by default, so that we can move it into the buildroot in %%install
%gem_install
+# Remove unnecessary gemspec file
+rm .%{gem_instdir}/%{gem_name}.gemspec
+
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
@@ -58,26 +65,26 @@ cp -pa .%{gem_dir}/* \
# for rspec tests. See https://github.com/gemnasium/gemnasium-parser/pull/29
# For now we will comment out the test suite.
#pushd .%%{gem_instdir}
-#rspec -Ilib spec
+# rspec -Ilib spec
#popd
%files
%dir %{gem_instdir}
%doc %{gem_instdir}/LICENSE
-%exclude %{gem_instdir}/.*
+%doc %{gem_instdir}/README.md
%{gem_libdir}
%exclude %{gem_cache}
-%exclude %{gem_instdir}/%{gem_name}.gemspec
-%exclude %{gem_instdir}/Gemfile
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
-%doc %{gem_instdir}/README.md
-%{gem_instdir}/Rakefile
-%{gem_instdir}/spec
+%exclude %{gem_instdir}/spec
%changelog
+* Sat Dec 28 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.1.9-2
+- Rearrange %files
+- Remove more files during %prep
+
* Mon Aug 05 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.1.9-1
- Initial package