SHA256
10
0
forked from pool/lua-cosmo

Accepting request 1002514 from home:Pi-Cla

Added requested tests

OBS-URL: https://build.opensuse.org/request/show/1002514
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-cosmo?expand=0&rev=1
This commit is contained in:
2022-09-15 07:45:35 +00:00
committed by Git OBS Bridge
commit c6ad5eba7a
8 changed files with 135 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

5
_multibuild Normal file
View File

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

17
_service Normal file
View File

@@ -0,0 +1,17 @@
<services>
<service mode="manual" name="obs_scm">
<param name="url">https://github.com/mascarenhas/cosmo</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="scm">git</param>
<param name="revision">e6118c8850b0ba1fc22b66294beb40c591d2a752</param>
<param name="versionrewrite-pattern">v(\d+.\d+.\d+)</param>
<param name="versionrewrite-replacement">\1</param>
</service>
<service mode="manual" name="tar" />
<service mode="manual" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="manual" name="set_version"/>
</services>

3
cosmo-16.06.04.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:094459fb28e22e35809f3803dd0af280de59cd4115ca17d4dac77d9169ab6166
size 23056

8
fix_test.patch Normal file
View File

@@ -0,0 +1,8 @@
diff -rub cosmo-16.06.04/tests/test_cosmo.lua cosmo-patched/tests/test_cosmo.lua
--- cosmo-16.06.04/tests/test_cosmo.lua 2016-06-04 12:59:21.000000000 -0600
+++ cosmo-patched/tests/test_cosmo.lua 2022-09-11 08:25:40.964576115 -0600
@@ -1,3 +1,4 @@
+package.path = "../src/?.lua;" .. package.path
local cosmo = require"cosmo"
local grammar = require"cosmo.grammar"

9
lua-cosmo.changes Normal file
View File

@@ -0,0 +1,9 @@
-------------------------------------------------------------------
Sun Sep 11 14:28:19 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>
- Add test and fix_test.patch
-------------------------------------------------------------------
Thu Aug 25 07:10:34 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>
- initial commit

69
lua-cosmo.spec Normal file
View File

@@ -0,0 +1,69 @@
#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# 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
Version: 16.06.04
Release: 0
Summary: A “safe templates” engine for Lua
License: MIT
Group: Development/Languages/Other
URL: https://github.com/mascarenhas/cosmo
Source: cosmo-%{version}.tar.xz
Patch: fix_test.patch
BuildRequires: %{flavor}-lpeg
BuildRequires: %{flavor}-luarocks
BuildRequires: %{flavor}-devel
Requires: %{flavor}
Requires: %{flavor}-lpeg
%lua_provides
%if "%{flavor}" == ""
Name: lua-%{mod_name}
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
templates, providing many of the advantages of Turing-complete template
engines, without the downside of allowing arbitrary code in the templates.
%prep
%autosetup -p1 -n %{mod_name}-%{version}
sed -i -e '/lpeg >=/d' "rockspec/%{mod_name}-%{rock_version}.rockspec"
%build
%luarocks_build "rockspec/%{mod_name}-%{rock_version}.rockspec"
%install
%luarocks_install *.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
%{lua_noarchdir}
%{luarocks_treedir}/%{mod_name}
%changelog