commit 7500d7b63de3aa8ad8df02f65c34bf6518579e9366386f5030613fa134daa647 Author: Matej Cepl Date: Sat Nov 2 22:05:04 2019 +0000 Accepting request 744924 from home:mcepl:branches:devel:languages:lua Initial effort to package argparse 0.7.0 OBS-URL: https://build.opensuse.org/request/show/744924 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-argparse?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..8711cd1 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + +lua51 +lua53 +test + diff --git a/argparse-0.7.0.tar.gz b/argparse-0.7.0.tar.gz new file mode 100644 index 0000000..c63916d --- /dev/null +++ b/argparse-0.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d85b31ca60d88c54ad743c3b5c4cdb0ae47ba57341c203a899b18c0277afec77 +size 43433 diff --git a/lua-argparse.changes b/lua-argparse.changes new file mode 100644 index 0000000..9c2ae90 --- /dev/null +++ b/lua-argparse.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat Nov 2 19:51:09 UTC 2019 - Matej Cepl + +- Initial effort to package argparse 0.7.0 diff --git a/lua-argparse.spec b/lua-argparse.spec new file mode 100644 index 0000000..a488758 --- /dev/null +++ b/lua-argparse.spec @@ -0,0 +1,81 @@ +# +# spec file for package lua-argparse +# +# 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 argparse +%define upversion 0.7.0 +Version: 0.7.0 +Release: 0 +Summary: A feature-rich command-line argument parser +License: MIT +Group: Development/Libraries/Other +Url: http://argparse.org/ +Source: https://github.com/luarocks/%{mod_name}/archive/%{upversion}.tar.gz#/%{mod_name}-%{upversion}.tar.gz +BuildRequires: %{flavor}-devel +BuildArch: noarch +Requires: %{flavor} +%if "%{flavor}" == "lua53" +Provides: lua-argparse = %{version} +Obsoletes: lua-argparse < %{version} +%endif +%if "%{flavor}" == "" +Name: lua-argparse +ExclusiveArch: do_not_build +%else +Name: %{flavor}-argparse +%endif +%if %{with test} +BuildRequires: %{flavor}-busted +%endif + +%description +Argparse supports positional arguments, options, flags, optional +arguments, subcommands and more. Argparse automatically generates usage, +help, and error messages, and can generate shell completion scripts. + + +%prep +%setup -q -n %{mod_name}-%{upversion} + +%build +/bin/true + +%install +%if ! %{with test} +install -v -D -m 0644 -t %{buildroot}%{lua_noarchdir} -p src/argparse.lua +%endif + +%check +%if %{with test} +busted +%endif + +%if ! %{with test} +%files +%license LICENSE +%doc CHANGELOG.md README.md +%{lua_noarchdir}/%{mod_name}* +%endif + +%changelog