# -------------------------------------------------------------------------------------------------- # File: nim.spec # Copyright 🄯 2023 Van de Bugger. # SPDX-License-Identifier: FSFAP # -------------------------------------------------------------------------------------------------- Source1000: vdb.lua %include %{S:1000} %bcond_without tests Name: nim Version: 1.6.10 Release: 0.vdb.1%{?dist} Summary: Nim language compiler License: MIT URL: https://nim-lang.org/ Source0: https://nim-lang.org/download/%{name}-%{version}.tar.xz # Integer overflow builtins were introduced in gcc 5.1. BuildRequires: gcc >= 5.1 Requires: gcc >= 5.1 %description %{text -- \ Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. } %prep %autosetup # The nim `install.sh` script sucks. It does not respect the `DESTDIR` environment variable. # In case of custom target directory (e. g. `$DESTDIR/usr/bin`), the script uses another directory # layout, not the layout used in case of `/usr/bin` target directory. # Let's hack it. sed -E -e 's/^( *[a-z]+[dD]ir="?)/\1$DESTDIR/' install.sh > install+dest.sh chmod a+x install+dest.sh %build ./build.sh cp bin/nim bin/nim.orig bin/nim c koch ./koch boot -d:release --debuginfo:on --passC=-fpie --passL=-pie %install export DESTDIR=%{buildroot} %{__mkdir_p} $DESTDIR/usr/bin ./install+dest.sh /usr/bin %{__rm} -rf %{buildroot}/opt %check # TODO %files %license copying.txt %dir %{_sysconfdir}/%{name} %{_sysconfdir}/%{name}/* %{_bindir}/* %dir %{_exec_prefix}/lib/%{name} %{_exec_prefix}/lib/%{name}/* %changelog * Tue Feb 7 2023 - Van de Bugger - 1.6.10-0.vdb.1 - Initial package