OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/mruby?expand=0&rev=19
143 lines
4.4 KiB
RPMSpec
143 lines
4.4 KiB
RPMSpec
# vim: set sw=4 ts=4 et nu:
|
|
#
|
|
# spec file for package mruby
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
|
%define sover 3_4_0
|
|
Name: mruby
|
|
Version: 3.4.0
|
|
Release: 0
|
|
Summary: Lightweight Ruby
|
|
License: MIT
|
|
Group: Development/Languages/Ruby
|
|
URL: https://github.com/mruby/mruby/
|
|
Source: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
# PATCH-FIX-OPENSUSE PATCH-FEATURE-UPSTREAM link-with-soname.patch -- Add SONAME to library
|
|
Patch0: link-with-soname.patch
|
|
# PATCH-FIX-UPSTREAM CVE-2025-7207.patch -- upstream patch for CVE-2025-7207 known as boo#1246138
|
|
Patch1: https://github.com/mruby/mruby/commit/1fdd96104180cc0fb5d3cb086b05ab6458911bb9.diff#/CVE-2025-7207.patch
|
|
BuildRequires: bison
|
|
BuildRequires: cmake
|
|
BuildRequires: pkgconfig
|
|
%if 0%{?suse_version} >= 1500
|
|
BuildRequires: %{rb_default_ruby_suffix}
|
|
%else
|
|
BuildRequires: rubygem(%{rb_default_ruby_abi}:rake)
|
|
%endif
|
|
|
|
%description
|
|
mruby is the lightweight implementation of the Ruby language complying to (part
|
|
of) the ISO standard.
|
|
|
|
mruby can be linked and embedded within your application.
|
|
|
|
We provide the interpreter program "mruby" and the interactive mruby shell
|
|
"mirb" as examples.
|
|
|
|
You can also compile Ruby programs into compiled byte code using the mruby
|
|
compiler "mrbc".
|
|
|
|
The "mrbc" is also able to generate compiled byte code in a C source file.
|
|
|
|
%package devel
|
|
Summary: Lightweight Ruby Embedded Environment
|
|
Group: Development/Languages/Ruby
|
|
Requires: libmruby%{sover} = %{version}
|
|
Requires: libmruby_core%{sover} = %{version}
|
|
|
|
%description devel
|
|
mruby is the lightweight implementation of the Ruby language complying to (part
|
|
of) the ISO standard.
|
|
|
|
This package contains the headers and static library files in order to embed
|
|
mruby into your application.
|
|
|
|
%package -n libmruby%{sover}
|
|
Summary: Lightweight Ruby Embedded Environment
|
|
Group: Development/Languages/Ruby
|
|
# Was wrongly used (only) on Factory until 02-2022
|
|
Obsoletes: libmruby3 < %{version}
|
|
|
|
%description -n libmruby%{sover}
|
|
mruby is the lightweight implementation of the Ruby language complying to (part
|
|
of) the ISO standard.
|
|
|
|
%package -n libmruby_core%{sover}
|
|
Summary: Lightweight Ruby Embedded Environment
|
|
Group: Development/Languages/Ruby
|
|
|
|
%description -n libmruby_core%{sover}
|
|
mruby is the lightweight implementation of the Ruby language complying to (part
|
|
of) the ISO standard.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
# Currently broken
|
|
sed -i 's|conf.enable_debug|# conf.enable_debug|' build_config/host-shared.rb
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
export LDFLAGS="%{optflags}"
|
|
export MRUBY_CONFIG="host-shared"
|
|
# Needed for mruby to find its libraries before they are installed
|
|
export LD_LIBRARY_PATH="$PWD/build/host/mrbc/lib/"
|
|
rake all
|
|
|
|
%install
|
|
# Install binaries
|
|
for b in mirb mrbc mruby; do
|
|
install -D -m 0755 "bin/${b}" "%{buildroot}%{_bindir}/${b}"
|
|
done
|
|
|
|
# Install libraries
|
|
for l in mruby mruby_core; do
|
|
l=l"ib$l.so"
|
|
install -D -m 0755 "build/host/lib/${l}.%{version}" "%{buildroot}%{_libdir}/$l.%{version}"
|
|
ln -s "${l}.%{version}" "%{buildroot}%{_libdir}/${l}"
|
|
done
|
|
|
|
install -d "%{buildroot}%{_includedir}"
|
|
cp -a include/* "%{buildroot}%{_includedir}/"
|
|
|
|
%post -p /sbin/ldconfig -n libmruby%{sover}
|
|
%post -p /sbin/ldconfig -n libmruby_core%{sover}
|
|
%postun -p /sbin/ldconfig -n libmruby%{sover}
|
|
%postun -p /sbin/ldconfig -n libmruby_core%{sover}
|
|
|
|
%files -n libmruby%{sover}
|
|
%{_libdir}/libmruby.so.%{version}
|
|
|
|
%files -n libmruby_core%{sover}
|
|
%{_libdir}/libmruby_core.so.%{version}
|
|
|
|
%files
|
|
%doc AUTHORS CONTRIBUTING.md LEGAL NEWS README.md
|
|
%license LICENSE
|
|
%{_bindir}/mirb
|
|
%{_bindir}/mrbc
|
|
%{_bindir}/mruby
|
|
%{_bindir}/mrbc
|
|
|
|
%files devel
|
|
%{_includedir}/mr*.h
|
|
%{_includedir}/mruby
|
|
%{_libdir}/libmruby*.so
|
|
|
|
%changelog
|