From ccb9465428d5b0edec46ca3f14f5a70c53e49884 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 4 Oct 2024 23:34:33 +0800 Subject: [PATCH] use nim macros Signed-off-by: madomado --- anda/langs/nim/choosenim/choosenim.spec | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/anda/langs/nim/choosenim/choosenim.spec b/anda/langs/nim/choosenim/choosenim.spec index da65acac28..5ec4158105 100644 --- a/anda/langs/nim/choosenim/choosenim.spec +++ b/anda/langs/nim/choosenim/choosenim.spec @@ -6,26 +6,20 @@ Release: 1%?dist Summary: Easily install and manage multiple versions of the Nim programming language License: BSD-3-Clause URL: https://github.com/nim-lang/choosenim -Source1: https://nim-lang.org/download/nim-%nimver-linux_x64.tar.xz +Source0: %url/archive/refs/tags/v%version.tar.gz Packager: madonuko -BuildRequires: nim git-core curl tar anda-srpm-macros +BuildRequires: nim nim-tools git-core anda-srpm-macros %description choosenim installs the Nim programming language from official downloads and sources, enabling you to easily switch between stable and development compilers. %prep -%git_clone %url v%version -%dnl tar -xvJf %SOURCE1 +%autosetup +%nim_prep %build -NIMPATH=`pwd`/nim-%nimver/bin -PATH=$PATH:$NIMPATH -# compile choosenim -%dnl ls -lah -%dnl nimble install --path=$NIMPATH -y -%dnl %nim_c --path:$NIMPATH -nimble build -d:release -t:"%nim_tflags" -l:"%nim_lflags" +%nim_c src/choosenim %install install -Dm755 src/choosenim %buildroot%_bindir/choosenim