File fuzion.spec of Package fuzion
#
# spec file for package fuzion
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
%{?!make_build:%global make_build %{__make} -O %{?_smp_mflags}}
Name: fuzion
Version: 0.091
Release: 0
Summary: The Fuzion Language Implementation
License: GPL-3.0-only
Group: Development/Languages/Other
URL: https://flang.dev/
Source0: https://github.com/tokiwa-software/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.rpmlintrc
BuildRequires: clang
BuildRequires: fdupes
BuildRequires: java-21-openjdk-jmods
BuildRequires: java-devel >= 21
BuildRequires: make
Requires: clang
Requires: java-openjdk >= 21
Requires: pkgconfig(bdw-gc)
ExcludeArch: %{ix86} %{arm}
%description
A language with a focus on simplicity, safety and correctness.
%prep
%setup -q
sed -i -e 's/clang -Wall /clang -fPIC -Wall /' Makefile
%build
%make_build -j1 all
sed -i -e '1s/env \+//' build/bin/fz*
%install
find build -name __marker_for_make__ -delete
install -dm0755 %{buildroot}%{_datadir}/%{name}
cp -prf build/* %{buildroot}%{_datadir}/%{name}
install -dm0755 %{buildroot}%{_libdir}
mv %{buildroot}%{_datadir}/%{name}/lib/lib%{name}.so %{buildroot}%{_libdir}
ln -s %{_libdir}/lib%{name}.so %{buildroot}%{_datadir}/%{name}/lib/
strip %{buildroot}%{_libdir}/lib%{name}.so
install -dm0755 %{buildroot}%{_bindir}
ln -s %{_datadir}/%{name}/bin/fz %{buildroot}%{_bindir}/fz
ln -s %{_datadir}/%{name}/bin/fzjava %{buildroot}%{_bindir}/fzjava
%fdupes %{buildroot}%{_datadir}/%{name} %{libdir}%{_datadir}/%{name}
%files
%license LICENSE
%doc {release_notes,README,SECURITY}.md
%{_bindir}/fz*
%{_datadir}/%{name}
%{_libdir}/lib%{name}.so
%exclude %{_datadir}/%{name}/tests
%exclude %{_datadir}/%{name}/*.md
%exclude %{_datadir}/%{name}/lib/*.dylib
%changelog