%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) %global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) Name: nim Version: 0.17.2 Release: 1%{?dist} Summary: Statically typed, imperative programming language # compiler is MIT, nimble package manager is BSD License: MIT and BSD URL: https://nim-lang.org # Upstream does not support these architectures yet. # Dependencies could use exclusive arches from macros.nim ExcludeArch: s390 s390x Source0: https://nim-lang.org/download/%{name}-%{version}.tar.xz Source1: nim.1 Source2: nimgrep.1 Source3: nimble.1 Source4: nimsuggest.1 Source5: macros.nim Patch0: 0001-allow-to-override-directories-in-install-script.patch Patch1: 0002-use-_datadir-for-platform-independent-library-path.patch # https://github.com/nim-lang/Nim/pull/6702 Patch3: 0003-fix-tasyncsend4757-test.patch # https://github.com/nim-lang/Nim/pull/6713 Patch4: 0004-fix-ppc64le-detection.patch # https://github.com/nim-lang/Nim/pull/6715 Patch5: 0005-fix-tnewasyncudp-endianness.patch BuildRequires: gcc BuildRequires: nodejs-devel openssl-devel BuildRequires: pkgconfig(bash-completion) %description Nim (formerly known as "Nimrod") is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nim's design focuses on efficiency, expressiveness, elegance (in the order of priority). %prep %autosetup -p1 %build # build bootstrap compiler sh build.sh # build the koch management tool ./bin/nim compile -d:release --debugger:native koch # build a new version of the compiler ./koch boot -d:release -d:useLinenoise --debugger:native # build tools ./koch tools -d:release --debugger:native rm -rf examples install.sh lib/pure/unidecode/gen.py ./koch geninstall -d:release --debugger:native %install sh install.sh \ %{buildroot}%{_bindir} \ %{buildroot}%{_sysconfdir} \ %{buildroot}%{_datadir} \ %{buildroot}%{_docdir} \ %{buildroot}%{_datadir} install -Dp -m755 bin/nim{ble,grep,suggest} %{buildroot}%{_bindir} install -Dp -m644 tools/nim.bash-completion %{buildroot}%{bashcompdir}/nim install -Dp -m644 dist/nimble/nimble.bash-completion %{buildroot}%{bashcompdir}/nimble install -Dp -m644 -t%{buildroot}%{_mandir}/man1 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 install -Dp -m644 %SOURCE5 %{buildroot}%{_rpmconfigdir}/macros/macros.nim %check for cat in lib io async rodfiles dll js debugger do ./koch tests --pedantic category $cat -d:nimCoroutines || (echo "$cat test category failed" && exit 1) done %files %license copying.txt dist/nimble/license.txt %dir %{_datadir}/nim %dir %{_datadir}/nimble %dir %{_docdir}/nim %config(noreplace) %{_sysconfdir}/*.cfg %doc %{_docdir}/nim/* %{_bindir}/nim* %{_datadir}/nim/* %{_datadir}/nimble/* %{_mandir}/man1/nim*.1* %{bashcompdir}/nim* %{_rpmconfigdir}/macros/macros.nim %changelog * Tue Sep 26 2017 Sergey Avseyev - 0.17.2-1 - Initial package