Name: janet # Held at 1.42.0: 1.42.1 changes only docstrings and the Makefile SONAME, and # its rewritten zsh completion quotes the {-h,--help} brace pairs, so # _arguments rejects every option spec and nothing completes. Version: 1.42.0 Release: 1.ci.a760a7cd9ef2%{?dist} Summary: Dynamic language and bytecode virtual machine License: MIT URL: https://janet-lang.org Source0: https://github.com/janet-lang/janet/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc # Below 0.61 meson silently skips the two janet.h install_symlink calls, which # surfaces late as missing %%files entries rather than as an unmet dependency. BuildRequires: meson >= 0.61 %description Janet makes a good system scripting language, or a language to embed in other programs. It's like Lua and GNU Guile in that regard. It has more built-in functionality and a richer core language than Lua, but smaller than GNU Guile or Python. However, it is much easier to embed and port than Python or Guile. There is a REPL for trying out the language, as well as the ability to run script files. This client program is separate from the core runtime, so Janet can be embedded in other programs. %package devel Summary: Development files for Janet Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Headers, the pkg-config file and the amalgamated janet.c needed to build native Janet modules or to embed the Janet runtime in a C program. %prep %autosetup -n %{name}-%{version} # examples/ ships as %%doc, so it must carry neither VCS dotfiles nor prebuilt # artifacts. jitfn.janet documents the nasm command that regenerates hello.bin. find examples -name '.*' -delete rm examples/jitfn/hello.bin %build # git_hash lands in janet/build, which janet -v and the amalgamation report. # Its upstream default is the placeholder string "meson". %meson -Ddefault_library=shared -Dgit_hash=%{release} %meson_build # doc.html is a declared meson target, just not a default one. %{__meson} compile -C %{_vpath_builddir} docs # gendoc stamps wall-clock time, which would make the payload differ per build. sed -i 's|
Generated [^<]*
||' %{_vpath_builddir}/doc.html %install %meson_install # jpm looks for the amalgamated janet.c under the module path. install -Dpm0644 %{_vpath_builddir}/%{name}.c %{buildroot}%{_libdir}/%{name}/%{name}.c # meson installs tools/.keep only to create the module directory; %%dir owns it. rm %{buildroot}%{_libdir}/%{name}/.keep install -Dpm0644 misc/completion/%{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dpm0644 misc/completion/%{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} install -Dpm0644 misc/completion/%{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish %check %meson_test # meson_test exercises the build tree; these cover what the spec itself stages. # The installed binary has no build RPATH, so point it at the staged library. LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/%{name} \ -e '(assert (= janet/version "%{version}"))' grep -qx 'Version: %{version}' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc %files %license LICENSE %doc README.md CHANGELOG.md %{_vpath_builddir}/doc.html examples/ %{_bindir}/%{name} %{_libdir}/lib%{name}.so.* %{_mandir}/man1/%{name}.1* # JANET_PATH -- the runtime module search path, so the base package owns it. %dir %{_libdir}/%{name} %{bash_completions_dir}/%{name} %{zsh_completions_dir}/_%{name} %{fish_completions_dir}/%{name}.fish %files devel %{_includedir}/%{name}.h %dir %{_includedir}/%{name} %{_includedir}/%{name}/%{name}.h %{_includedir}/%{name}/%{name}_%{version}.h %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{name}/%{name}.c %changelog * Wed Sep 09 2026 Bahtiar `kalkin-` Gadimov