File mruby.spec of Package mruby
# vim: set sw=4 ts=4 et nu:
#
# spec file for package mruby
#
# Copyright (c) 2020 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
Name: mruby
Version: 2.1.1
Release: 0
Summary: Lightweight Ruby
License: MIT
Group: Development/Languages/Ruby
URL: https://github.com/mruby/mruby/
Source: mruby-%{version}.tar.gz
#Patch1: mruby-makefile_optflags.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
%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.
%prep
%setup -q
%build
CFLAGS="%{optflags}" \
CXXFLAGS="%{optflags}" \
rake all
%install
for b in mirb mrbc mruby; do
install -D -m 0755 "bin/${b}" "%{buildroot}%{_bindir}/${b}"
done
# libmruby_core.a
for l in libmruby.a ; do
install -D -m 0644 "build/host-debug/lib/${l}" "%{buildroot}%{_libdir}/${l}"
done
install -d "%{buildroot}%{_includedir}"
cp -a include/* "%{buildroot}%{_includedir}/"
%files
%doc AUTHORS CONTRIBUTING.md LEGAL NEWS README.md TODO
%license LICENSE
%{_bindir}/mirb
%{_bindir}/mrbc
%{_bindir}/mruby
%{_bindir}/mrbc
%files devel
%{_includedir}/mr*.h
%{_includedir}/mruby
%{_libdir}/libmruby.a
#{_libdir}/libmruby_core.a
%changelog