# SLE does not provide "bats", which is required for testing. %if %{undefined sle_version} %bcond_without test %else %bcond_with test %endif Name: ruby-build Version: 20220412 Release: 0 BuildArch: noarch License: MIT Group: Development/Languages/Ruby Url: https://github.com/rbenv/ruby-build Summary: Compile and install Ruby Source0: https://github.com/rbenv/ruby-build/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: fix-test-requiring-git-repository.patch %if %{with test} BuildRequires: bats %endif Requires: bash Requires: curl Requires: gcc # ruby MRI BuildRequires Requires: bison Requires: gdbm-devel Requires: gperf Requires: graphviz Requires: libjpeg-devel Requires: openssl-devel Requires: readline-devel Requires: tk-devel Requires: automake Requires: libffi-devel %description ruby-build provides a simple way to compile and install different versions of Ruby on UNIX-like systems. %prep %setup -q %patch0 -p1 %build %install PREFIX="%{buildroot}%{_prefix}" ./install.sh sed -i 's|#!/usr/bin/env bash|#!/bin/bash|g' %{buildroot}%{_bindir}/* %check %if %{with test} bats test %endif %files %license LICENSE %doc README.md %{_bindir}/* %dir %{_datadir}/ruby-build %{_datadir}/ruby-build/*