3 Commits

5 changed files with 21 additions and 8 deletions

1
.gitattributes vendored
View File

@@ -21,3 +21,4 @@
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*.changes merge=merge-changes

5
.gitignore vendored
View File

@@ -1 +1,6 @@
.osc
*.obscpio
*.osc
_build.*
.pbuild
lua*-cosmo-*-build/

View File

@@ -1,5 +1,5 @@
<multibuild>
<package>lua51</package>
<package>luajit</package>
<package>lua53</package>
<package>lua54</package>
</multibuild>

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Oct 24 14:47:39 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Switch off building lua51 build of the package.
-------------------------------------------------------------------
Tue Oct 14 23:11:41 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Make the package buildable with LuaJIT.
-------------------------------------------------------------------
Mon Apr 1 01:48:59 UTC 2024 - Gordon Leung <pirateclip@protonmail.com>

View File

@@ -15,7 +15,6 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define flavor @BUILD_FLAVOR@
%define mod_name cosmo
%define rock_version 16.06.04-1
@@ -34,6 +33,7 @@ BuildRequires: lua-macros
BuildRequires: zstd
Requires: %{flavor}
Requires: %{flavor}-lpeg
BuildArch: noarch
%lua_provides
%if "%{flavor}" == ""
Name: lua-%{mod_name}
@@ -41,7 +41,6 @@ ExclusiveArch: do_not_build
%else
Name: %{flavor}-%{mod_name}
%endif
BuildArch: noarch
%description
Cosmo is a "safe templates" engine. It allows you to fill nested
@@ -54,19 +53,17 @@ engines, without the downside of allowing arbitrary code in the templates.
sed -i -e '/lpeg >=/d' "rockspec/%{mod_name}-%{rock_version}.rockspec"
%build
%luarocks_build "rockspec/%{mod_name}-%{rock_version}.rockspec"
%{luarocks_build} rockspec/%{mod_name}-%{rock_version}.rockspec
%install
%luarocks_install *.rock
%{luarocks_install} %{mod_name}-%{rock_version}.*.rock
%check
cd tests
lua test_cosmo.lua
%files
%license %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc/cosmo.md
%docdir %{luarocks_treedir}/%{mod_name}/%{rock_version}/doc
%doc README __rocktree/*
%{lua_noarchdir}
%{luarocks_treedir}/%{mod_name}
%changelog