10
0

Accepting request 744923 from home:mcepl:branches:devel:languages:lua

Initial effort to package moonscript 0.5.0

OBS-URL: https://build.opensuse.org/request/show/744923
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-moonscript?expand=0&rev=1
This commit is contained in:
2019-11-02 22:04:25 +00:00
committed by Git OBS Bridge
commit 9306ea38d4
6 changed files with 122 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>test</package>
</multibuild>

4
lua-moonscript.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sat Nov 2 19:51:09 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Initial effort to package moonscript 0.5.0

86
lua-moonscript.spec Normal file
View File

@@ -0,0 +1,86 @@
#
# spec file for package lua-moonscript
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define flavor @BUILD_FLAVOR@
%if "%{flavor}" == "test"
%define flavor lua51
%bcond_without test
%else
%bcond_with test
%endif
%define mod_name moonscript
%define upversion 0.5.0
Version: 0.5.0
Release: 0
Summary: A programmer friendly language that compiles to Lua
License: MIT
Group: Development/Libraries/Other
Url: http://moonscript.org/
Source: https://github.com/leafo/moonscript/archive/v%{upversion}.tar.gz#/%{mod_name}-%{upversion}.tar.gz
BuildRequires: %{flavor}-devel
BuildRequires: %{flavor}-lpeg >= 0.10
BuildRequires: %{flavor}-argparse >= 0.5
BuildRequires: %{flavor}-luafilesystem >= 1.5
# optionally BuildRequires: %%{flavor}-lnotify
BuildArch: noarch
Requires: %{flavor}
%if "%{flavor}" == "lua53"
Provides: lua-moonscript = %{version}
Obsoletes: lua-moonscript < %{version}
%endif
%if "%{flavor}" == ""
Name: lua-moonscript
ExclusiveArch: do_not_build
%else
Name: %{flavor}-moonscript
%endif
%if %{with test}
BuildRequires: %{flavor}-busted
%endif
%description
A programmer friendly language that compiles to Lua.
%prep
%setup -q -n %{mod_name}-%{upversion}
sed -i 's|^#!/usr/bin/env lua|#!/usr/bin/lua%{lua_version}|' bin/moon{,c}
%build
/bin/true
%install
%if ! %{with test}
install -m 0755 -p -d %{buildroot}%{lua_noarchdir}
cp -r -p moonscript %{buildroot}%{lua_noarchdir}
cp -r -p moon %{buildroot}%{lua_noarchdir}
install -D -m 0755 -p -t %{buildroot}%{_bindir} bin/moon{,c}
%endif
%check
%if %{with test}
busted
%endif
%if ! %{with test}
%files
%doc CHANGELOG.md README.md docs
%{_bindir}/moon*
%{lua_noarchdir}/moon*
%endif
%changelog

BIN
moonscript-0.5.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.