generated from pool/new_package
Initial packaging effort for jsregexp 0.1.0.
This commit is contained in:
5
_multibuild
Normal file
5
_multibuild
Normal file
@@ -0,0 +1,5 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
</multibuild>
|
4
lua-jsregexp.changes
Normal file
4
lua-jsregexp.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 30 14:42:51 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Initial packaging effort for jsregexp 0.1.0.
|
85
lua-jsregexp.spec
Normal file
85
lua-jsregexp.spec
Normal file
@@ -0,0 +1,85 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2023 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 jsregexp
|
||||
Version: 0.1.0
|
||||
Release: 0
|
||||
Summary: JavaScript regular expressions for Lua
|
||||
License: MIT
|
||||
URL: https://github.com/kmarius/jsregexp
|
||||
Source: https://github.com/kmarius/jsregexp/archive/refs/tags/v%{version}.tar.gz
|
||||
BuildRequires: %{flavor}-devel
|
||||
BuildRequires: lua-macros
|
||||
Requires: %{flavor}
|
||||
%lua_provides
|
||||
%if "%{flavor}" == ""
|
||||
Name: lua-%{mod_name}
|
||||
ExclusiveArch: do_not_build
|
||||
%else
|
||||
Name: %{flavor}-%{mod_name}
|
||||
Provides: %{flavor}-jsregexp = %{version}
|
||||
Obsoletes: %{flavor}-jsregexp < %{version}
|
||||
%endif
|
||||
|
||||
%description
|
||||
Provides ECMAScript regular expressions for Lua 5.1, 5.2, 5.3, 5.4 and LuaJit. Uses libregexp from Fabrice Bellard's QuickJS.
|
||||
|
||||
%package doc
|
||||
Summary: Lua Documentation for %{mod_name}
|
||||
Requires: %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation and examples included with the library, sometimes
|
||||
generated by luadoc or ldoc.
|
||||
|
||||
%prep
|
||||
%setup -q -n jsregexp-%{version}
|
||||
|
||||
# Set our cflags
|
||||
sed -i \
|
||||
-e '/^INCLUDE_DIR =/s:-I.*$:-I %{lua_incdir}:' \
|
||||
-e 's: -O2: %{optflags}:g' \
|
||||
Makefile
|
||||
|
||||
%build
|
||||
make %{?_make_output_sync}
|
||||
|
||||
%install
|
||||
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
mkdir -p %{buildroot}%{lua_archdir}
|
||||
mkdir -p %{buildroot}%{lua_noarchdir}
|
||||
|
||||
install jsregexp.so %{buildroot}%{lua_archdir}
|
||||
|
||||
%check
|
||||
LUA_PATH='%{_datadir}/lua/%{lua_version}/?.lua'
|
||||
LUA_PATH="%{buildroot}%{lua_noarchdir}/?/init.lua;${LUA_PATH}"
|
||||
export LUA_PATH="%{buildroot}%{lua_noarchdir}/?.lua;${LUA_PATH}"
|
||||
%{_bindir}/lua%{lua_version} test.lua
|
||||
|
||||
%files
|
||||
%{lua_archdir}
|
||||
%{lua_noarchdir}
|
||||
|
||||
%files doc
|
||||
%doc re.html jsregexp.html HISTORY
|
||||
|
||||
%changelog
|
BIN
v0.1.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
v0.1.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user