# FIXME: could be removed once nim-srpm-macros will be installed automatically %global nim_arches %{ix86} x86_64 %{arm} aarch64 %{power64} %define __nim_common_opts -d:release --debugger:gdb %define __nim_harden_config() \ for file in %*; do \ echo "gcc.options.always %= \\"\\${gcc.options.always} ${CFLAGS:-%optflags}\\"" >> $file; \ echo "gcc.options.linker %= \\"\\${gcc.options.linker} ${LDFLAGS:-%__global_ldflags}\\"" >> $file; \ done %global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) %global bashcomproot %(dirname %{bashcompdir} 2>/dev/null) %global rev 712.g5e8ac0792 Name: nim Version: 0.17.3 Release: %{rev}%{?dist} Summary: Statically typed, imperative programming language # compiler is MIT, nimble package manager is BSD License: MIT and BSD URL: https://nim-lang.org ExclusiveArch: %{nim_arches} Source0: https://avsej.fedorapeople.org/nim.src/%{version}-%{rev}/nim-%{version}.tar.xz Source1: nim.1 Source2: nimgrep.1 Source3: nimble.1 Source4: nimsuggest.1 Patch0: 0001-allow-to-override-directories-in-install-script.patch Patch1: 0002-use-_datadir-for-platform-independent-library-path.patch Patch6: 0006-use-versioned-source-links-in-docs.patch Patch8: 0008-fix-compiler-binary-lookup-in-docgen.patch BuildRequires: nim-srpm-macros BuildRequires: gcc openssl-devel BuildRequires: pkgconfig(bash-completion) # test dependencies BuildRequires: nodejs-devel # doc dependencies BuildRequires: tex(latex) BuildRequires: tex(geometry.sty) BuildRequires: tex(inputenc.sty) BuildRequires: tex(fontenc.sty) BuildRequires: tex(graphicx.sty) BuildRequires: tex(lmodern.sty) BuildRequires: tex(courier.sty) BuildRequires: tex(lmodern.sty) BuildRequires: tex(tabularx.sty) BuildRequires: tex(hyperref.sty) %if ! (0%{?rhel} && 0%{?rhel} <= 7) Recommends: %{name}-tools%{_isa} = %{version}-%{release} Suggests: %{name}-docs = %{version}-%{release} %endif %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). %package tools Summary: Tools for Nim programming language %description tools 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). This package provides various tools, which help Nim programmers. %package doc Summary: Documentation for Nim programming language BuildArch: noarch %description doc 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). This package provides documentation and reference manual for the language and its standard library. %prep %autosetup -p1 %build # build bootstrap compiler ./build.sh %__nim_harden_config compiler/nim.cfg %__nim_harden_config config/nim.cfg # build the koch management tool ./bin/nim compile %{__nim_common_opts} koch # build a new version of the compiler ./koch boot %{__nim_common_opts} -d:useLinenoise # build tools ./koch tools %{__nim_common_opts} # generate documentation ./koch web --onlyDocs sed -i '/ - 0.17.3-712.g5e8ac0792 - Update development package to 5e8ac0792 * Fri Dec 1 2017 Sergey Avseyev - 0.17.2-3 - Do not load remote fonts in local HTML documentation * Sat Nov 18 2017 Sergey Avseyev - 0.17.2-2 - Generate and install PDF documentation * Tue Sep 26 2017 Sergey Avseyev - 0.17.2-1 - Initial package