2020-04-02 01:10:35 +00:00
|
|
|
#
|
|
|
|
# spec file for package lua-loadkit
|
|
|
|
#
|
|
|
|
# Copyright (c) 2020 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@
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define flavor lua51
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
%define mod_name loadkit
|
|
|
|
|
|
|
|
Version: 1.1.0
|
|
|
|
Release: 0
|
|
|
|
Summary: Loadkit allows you to load arbitrary files within the Lua package path
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
URL: https://github.com/leafo/loadkit
|
|
|
|
Source: https://github.com/leafo/%{mod_name}/archive/v%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz
|
|
|
|
BuildRequires: %{flavor}-moonscript
|
|
|
|
BuildRequires: %{flavor}-devel
|
|
|
|
Requires: %{flavor}
|
2020-04-04 19:00:17 +00:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{flavor}-busted
|
|
|
|
%endif
|
2020-04-02 01:10:35 +00:00
|
|
|
BuildArch: noarch
|
2020-04-02 01:13:18 +00:00
|
|
|
%if "%{flavor}" == ""
|
|
|
|
Name: lua-loadkit
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%else
|
2020-04-04 19:00:17 +00:00
|
|
|
%if %{with test}
|
|
|
|
Name: %{flavor}-loadkit-test
|
|
|
|
%else
|
2020-04-02 01:13:18 +00:00
|
|
|
Name: %{flavor}-loadkit
|
|
|
|
%endif
|
2020-04-04 19:00:17 +00:00
|
|
|
%endif
|
2020-04-02 01:10:35 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Loadkit lets you register new file extension handlers that
|
|
|
|
can be opened with require, or you can just search for files
|
|
|
|
of any extension using the current search path.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{mod_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
2020-04-04 19:00:17 +00:00
|
|
|
moonc loadkit.moon
|
2020-04-02 01:10:35 +00:00
|
|
|
|
|
|
|
%install
|
2020-04-04 19:00:17 +00:00
|
|
|
%if ! %{with test}
|
2020-04-02 01:10:35 +00:00
|
|
|
install -v -D -m 0644 -t %{buildroot}%{lua_noarchdir} -p loadkit.lua
|
2020-04-04 19:00:17 +00:00
|
|
|
%endif
|
2020-04-02 01:10:35 +00:00
|
|
|
|
|
|
|
%check
|
2020-04-04 19:00:17 +00:00
|
|
|
%if %{with test}
|
2020-04-02 01:10:35 +00:00
|
|
|
busted
|
2020-04-04 19:00:17 +00:00
|
|
|
%endif
|
2020-04-02 01:10:35 +00:00
|
|
|
|
2020-04-04 19:00:17 +00:00
|
|
|
%if ! %{with test}
|
2020-04-02 01:10:35 +00:00
|
|
|
%files
|
|
|
|
%doc README.md
|
|
|
|
%{lua_noarchdir}/%{mod_name}*
|
2020-04-04 19:00:17 +00:00
|
|
|
%endif
|
2020-04-02 01:10:35 +00:00
|
|
|
|
|
|
|
%changelog
|