Revision 6fb49039
Added by specs-from-koji (Jenkins) over 10 years ago
rpms/epel-6/ruby193-ruby-wrapper/LICENSE | ||
---|---|---|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
rpms/epel-6/ruby193-ruby-wrapper/README | ||
---|---|---|
%{scl_prefix}-ruby-wrapper
|
||
|
||
This is just a tiny wrapper script to be used as a shim where useful. It is
|
||
used in OpenShift Origin for RHEL+RHSCL installs and it's been packaged
|
||
independently in hopes it might be useful for others.
|
||
|
||
You should find an example script in your docdir (most likely
|
||
/usr/share/doc/%{scl_prefix}-ruby-wrapper/)
|
rpms/epel-6/ruby193-ruby-wrapper/example_shim | ||
---|---|---|
export LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/local/lib64:/opt/rh/ruby193/root/usr/lib64
|
||
export GEM_HOME=/opt/rh/ruby193/root/usr/share/gems
|
||
export GEM_PATH=/opt/rh/ruby193/root/usr/local/share/gems:/opt/rh/ruby193/root/usr/share/gems
|
||
|
||
ruby193-ruby $@
|
||
|
rpms/epel-6/ruby193-ruby-wrapper/ruby-wrapper | ||
---|---|---|
#!/bin/bash
|
||
|
||
COMMAND="ruby $@"
|
||
|
||
scl enable FIXMESCL "$COMMAND"
|
||
|
rpms/epel-6/ruby193-ruby-wrapper/ruby-wrapper-rails | ||
---|---|---|
#!/bin/bash
|
||
|
||
COMMAND="rails $@"
|
||
|
||
scl enable FIXMESCL "$COMMAND"
|
||
|
rpms/epel-6/ruby193-ruby-wrapper/ruby-wrapper-rake | ||
---|---|---|
#!/bin/bash
|
||
|
||
COMMAND="rake $@"
|
||
|
||
scl enable FIXMESCL "$COMMAND"
|
||
|
rpms/epel-6/ruby193-ruby-wrapper/ruby-wrapper.spec | ||
---|---|---|
%{!?scl:%global pkg_name %{name}}
|
||
%{?scl:%scl_package %{name}}
|
||
|
||
%define wrapper_doc_dir %{_root_datadir}/doc/%{name}-%{version}
|
||
|
||
%global rubyabi 1.9.1
|
||
|
||
Summary: Wrapper for %{scl_prefix} ruby.
|
||
Name: %{?scl:%scl_prefix}ruby-wrapper
|
||
Version: 0.0.2
|
||
Release: 4%{?dist}
|
||
Group: Development/Languages
|
||
License: ASL 2.0
|
||
URL: https://github.com/maxamillion/ruby-wrapper
|
||
Requires: %{?scl:%scl_prefix}ruby(abi) = %{rubyabi}
|
||
Requires: %{?scl:%scl_prefix}ruby
|
||
Requires: %{?scl:%scl_prefix}rubygems
|
||
Source0: ruby-wrapper
|
||
Source1: ruby-wrapper-rake
|
||
Source2: ruby-wrapper-rails
|
||
Source3: LICENSE
|
||
Source4: README
|
||
Source5: example_shim
|
||
BuildArch: noarch
|
||
|
||
%description
|
||
Wrapper for %{scl_prefix} ruby so that other wrapper scripts can be
|
||
written with a "shim." Examples can be found in the doc directory.
|
||
|
||
%install
|
||
|
||
# Create the %%{_root_bindir} wrapper:
|
||
%if 0%{?scl:1}
|
||
mkdir -p %{buildroot}%{_root_bindir}
|
||
install -p -m0755 %{SOURCE0} %{buildroot}%{_root_bindir}/%{scl_prefix}ruby
|
||
install -p -m0755 %{SOURCE1} %{buildroot}%{_root_bindir}/%{scl_prefix}rake
|
||
install -p -m0755 %{SOURCE2} %{buildroot}%{_root_bindir}/%{scl_prefix}rails
|
||
|
||
# Modify the shim/wrapper to include the correct scl
|
||
sed -i s/FIXMESCL/%{scl}/ %{buildroot}%{_root_bindir}/%{scl_prefix}ruby
|
||
sed -i s/FIXMESCL/%{scl}/ %{buildroot}%{_root_bindir}/%{scl_prefix}rake
|
||
sed -i s/FIXMESCL/%{scl}/ %{buildroot}%{_root_bindir}/%{scl_prefix}rails
|
||
|
||
mkdir -p %{buildroot}%{wrapper_doc_dir}
|
||
|
||
install -p -m0644 %{SOURCE3} %{buildroot}%{wrapper_doc_dir}/LICENSE
|
||
install -p -m0644 %{SOURCE4} %{buildroot}%{wrapper_doc_dir}/README
|
||
install -p -m0644 %{SOURCE5} %{buildroot}%{wrapper_doc_dir}/example_shim
|
||
|
||
%else
|
||
# Not SCL is an error, this should only build for SCL
|
||
exit 1
|
||
%endif
|
||
|
||
%files
|
||
%dir %{wrapper_doc_dir}
|
||
%{wrapper_doc_dir}/*
|
||
|
||
%{?scl:%{_root_bindir}/%{scl_prefix}ruby}
|
||
%{?scl:%{_root_bindir}/%{scl_prefix}rake}
|
||
%{?scl:%{_root_bindir}/%{scl_prefix}rails}
|
||
|
||
|
||
%changelog
|
||
* Tue Dec 03 2013 Eric D Helms <ehelms@redhat.com> 0.0.2-4
|
||
- new package built with tito
|
||
|
||
* Wed Sep 18 2013 Sam Kottler <shk@redhat.com> -0.0.2-3
|
||
* Add a rails wrapper
|
||
* Mon Sep 9 2013 Sam Kottler <shk@redhat.com> - 0.0.2-2
|
||
- Move /usr/bin/ruby193-ruby-rake to /usr/bin/ruby193-rake
|
||
* Mon Sep 9 2013 Sam Kottler <shk@redhat.com> - 0.0.2-1
|
||
- Add prefixed rake wrapper
|
||
* Wed Jun 26 2013 Adam Miller <maxamillion@fedoraproject.org> - 0.0.1-2
|
||
- Fix rubyabi
|
||
* Wed Jun 26 2013 Adam Miller <maxamillion@fedoraproject.org> - 0.0.1-1
|
||
- First package of the ruby-wrapper
|
Also available in: Unified diff
New package ruby193-ruby-wrapper, version 0.0.2-4.el6