# Empty file debugsourcefiles.list %global debug_package %{nil} %global upstreamversion 4.8.0 %global rcrel rc2 %global upstreamrelease %{upstreamversion}-%{rcrel} Name: lean4-rc Version: %{upstreamversion}~%{rcrel} Release: 1%{?dist} Summary: Functional programming language and theorem prover License: Apache-2.0 URL: https://lean-lang.org/ Source0: https://github.com/leanprover/lean4/archive/refs/tags/v%{upstreamrelease}.tar.gz#/lean4-%{upstreamrelease}.tar.gz Patch0: lean4-ldflags-libgmp.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gmp-devel ExcludeArch: s390x %{ix86} %description Lean is a functional programming language that makes it easy to write correct and maintainable code. You can also use Lean as an interactive theorem prover. Lean programming primarily involves defining types and functions. This allows your focus to remain on the problem domain and manipulating its data, rather than the details of programming. %package default Summary: Make lean4-rc the default lean package Requires: %{name}%{?_isa} = %{version}-%{release} Conflicts: lean4 %description default The package add unversioned bindir files so that it can be used in place of the main lean4 package as default. %prep %autosetup -n lean4-%{upstreamrelease} -p1 %build %cmake \ -DLEAN_BUILD_TYPE="RELEASE" \ -DUSE_GITHASH=OFF \ -DLEAN_INSTALL_PREFIX=%{buildroot} %cmake_build %install # cmake_install does not do anything make -C redhat-linux-build/stage1 install %global leandir %{_libdir}/lean4-%{upstreamversion} mkdir -p %{buildroot}%{_libdir} rm -f %{buildroot}/lean-%{upstreamrelease}-linux/LICENSE* # rc does not have suffix mv %{buildroot}/lean-%{upstreamversion}-linux %{buildroot}%{leandir} rm %{buildroot}%{leandir}/LICENSE* strip %{buildroot}%{leandir}/bin/{lake,lean,leanc} chmod a+x %{buildroot}%{leandir}/lib/lean/lib*shared.so strip %{buildroot}%{leandir}/lib/lean/lib*shared.so mkdir -p %{buildroot}%{_bindir} ( for i in $(ls %{buildroot}%{leandir}/bin); do ln -s ../%{_lib}/lean4-%{upstreamversion}/bin/$i %{buildroot}%{_bindir}/$i-%{upstreamversion} ln -s $i-%{upstreamversion} %{buildroot}%{_bindir}/$i done ) %files %license LICENSE %doc CONTRIBUTING.md README.md RELEASES.md %{_bindir}/lake-%{upstreamversion} %{_bindir}/lean-%{upstreamversion} %{_bindir}/leanc-%{upstreamversion} %{_bindir}/leanmake-%{upstreamversion} %dir %{leandir} %{leandir}/bin %dir %{leandir}/include %{leandir}/include/lean %dir %{leandir}/lib %{leandir}/lib/lean %dir %{leandir}/share %{leandir}/share/lean %dir %{leandir}/src %{leandir}/src/lean %files default %{_bindir}/lake %{_bindir}/lean %{_bindir}/leanc %{_bindir}/leanmake %changelog * Sat May 25 2024 Jens Petersen - 4.8.0~rc2-1 - https://github.com/leanprover/lean4/blob/v4.8.0-rc2/RELEASES.md * Tue May 21 2024 Jens Petersen - 4.8.0~rc1-1 - https://github.com/leanprover/lean4/blob/v4.8.0-rc1/RELEASES.md * Fri May 17 2024 Jens Petersen - 4.7.0-4 - link with -lgmp instead of libgmp.so file * Thu May 2 2024 Jens Petersen - 4.7.0-3 - install under libdir/lean4 for now with symlinks to bindir * Tue Apr 30 2024 Jens Petersen - 4.7.0-2 - strip bin and lib*.so files * Mon Apr 29 2024 Jens Petersen - 4.7.0-1 - https://github.com/leanprover/lean4/releases/tag/v4.7.0 - https://lean-lang.org/blog/2024-4-4-lean-470/ * Tue Dec 12 2023 Jens Petersen - 4.3.0.-1 - initial packaging