diff options
author | Vít Ondruch <vondruch@redhat.com> | 2015-08-24 15:24:35 +0200 |
---|---|---|
committer | Vít Ondruch <vondruch@redhat.com> | 2015-08-24 15:24:35 +0200 |
commit | acc18add0423f8e9691acf3e41d4e3d69b9d721d (patch) | |
tree | 770b6c39f58545106cec166b1f6163813a05ec43 | |
parent | df4d998692eabf117efb67f205124640407e9796 (diff) | |
download | rubygem-closure-compiler-acc18add0423f8e9691acf3e41d4e3d69b9d721d.tar.gz rubygem-closure-compiler-acc18add0423f8e9691acf3e41d4e3d69b9d721d.tar.xz rubygem-closure-compiler-acc18add0423f8e9691acf3e41d4e3d69b9d721d.zip |
Initial package
-rw-r--r-- | rubygem-closure-compiler.spec | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/rubygem-closure-compiler.spec b/rubygem-closure-compiler.spec new file mode 100644 index 0000000..7783676 --- /dev/null +++ b/rubygem-closure-compiler.spec @@ -0,0 +1,96 @@ +# Generated from closure-compiler-1.1.1.gem by gem2rpm -*- rpm-spec -*- +%global gemname closure-compiler + +%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%global geminstdir %{gemdir}/gems/%{gemname}-%{version} +%global rubyabi 1.8 + +%global testdir %{_tmppath}/%{gemname}-%{version} + +Summary: Ruby Wrapper for the Google Closure Compiler +Name: rubygem-%{gemname} +Version: 1.1.1 +Release: 1%{?dist} +Group: Development/Languages +License: ASL 2.0 +URL: http://github.com/documentcloud/closure-compiler/ +Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem +# git clone https://github.com/documentcloud/closure-compiler.git && cd closure-compiler && git checkout 1.1.1 +# tar czvf closure-compiler-1.1.1-tests.tgz test/ +Source1: %{gemname}-%{version}-tests.tgz +Requires: ruby(abi) = %{rubyabi} +Requires: ruby(rubygems) +Requires: ruby +# TODO: Add runtime dependency on closure-compiler java package +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: ruby(rubygems) +BuildRequires: ruby +# TODO: Replace with dependency on closure-compiler java package +BuildRequires: java >= 1:1.6.0 +BuildArch: noarch +Provides: rubygem(%{gemname}) = %{version} + +%description +A Ruby Wrapper for the Google Closure Compiler. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + + +%prep +%setup -q -c -T +mkdir -p .%{gemdir} +gem install --local --install-dir .%{gemdir} \ + --force %{SOURCE0} + +%build + +%install +mkdir -p %{buildroot}%{gemdir} +cp -a .%{gemdir}/* \ + %{buildroot}%{gemdir}/ + +# TODO: Uncomment when closure-compiller java package is available. + +#sed -i -e "s|COMPILER_JAR = File.join(COMPILER_ROOT|COMPILER_JAR = File.join('%{_javadir}'|" \ +# %{buildroot}%{geminstdir}/lib/closure-compiler.rb + +# TODO: COMPILER_JAR and COMPILER_VERSION will be necessary to change as well. + +%check +rm -rf %{testdir} +mkdir %{testdir} +tar xzvf %{SOURCE1} -C %{testdir} +pushd %{testdir} + +# ruby -rubygems -I%{buildroot}%{geminstdir}/lib -Itest -e "Dir.glob('test/**/*_test.rb').each {|t| require t}" +testrb -I%{buildroot}%{geminstdir}:test test/ + +popd +rm -rf %{testdir} + +%files +%dir %{geminstdir} +%{geminstdir}/COPYING +%{geminstdir}/LICENSE +%exclude %{geminstdir}/closure-compiler.gemspec +%exclude %{geminstdir}/lib/*.jar +%{geminstdir}/lib +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec + +%files doc +%doc %{geminstdir}/README.textile +%doc %{gemdir}/doc/%{gemname}-%{version} + + +%changelog +* Tue Jul 26 2011 Vít Ondruch <vondruch@redhat.com> - 1.1.1-1 +- Initial package |