%global gem_name stickshift-controller # Conditionally set required macros for distros without rubygems-devel This can # be removed once https://bugzilla.redhat.com/show_bug.cgi?id=788001 is # resolved. %{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)} Summary: Rails engine for the OpenShift Broker API Name: rubygem-%{gem_name} Version: 0.14.2 Release: 1%{?dist} Group: Development/Tools License: ASL 2.0 URL: http://openshift.redhat.com Source0: http://mirror.openshift.com/pub/crankcase/source/rubygem-%{gem_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ruby(abi) >= 1.8 Requires: rubygems Requires: rubygem(activemodel) Requires: rubygem(highline) Requires: rubygem(json_pure) Requires: rubygem(parseconfig) Requires: rubygem(state_machine) Requires: rubygem(stickshift-common) Requires: rubygem(open4) BuildRequires: ruby-devel %if 0%{?rhel} == 6 BuildRequires: rubygems %else BuildRequires: rubygems-devel %endif BuildArch: noarch Provides: rubygem(%{gem_name}) = %version %description This packages contains a Rails engine that provides the majority of the OpenShift Broker API. %prep %setup -q echo REDHAT_VERSION %{redhat_version} %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{ruby_sitelibdir} # Build and install into the rubygem structure gem build %{gem_name}.gemspec gem install --local --install-dir %{buildroot}%{gem_dir} --force %{gem_name}-%{version}.gem %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{gem_dir}/doc/%{gem_name}-%{version} %{gem_dir}/gems/%{gem_name}-%{version} %{gem_dir}/cache/%{gem_name}-%{version}.gem %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %changelog * Wed Jul 18 2012 Brenton Leanhardt 0.14.2-1 - Added ruby-devel and rubygem-devel build requires and replaced the ruby_sitelib and geminstdir macros with the standard macros. - Renamed %gemname to %gem_name so %geminstdir will work correctly. - Fixed several file mode problems with libraries - Rebased to the latest upstream version * Mon Jul 09 2012 Brenton Leanhardt 0.14.1-1 - Initial package creation for Fedora - Removed rcov