SHA256
10
0
forked from pool/lua-lua-ev

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

- Initial packaging effort of lua-ev 1.5.

OBS-URL: https://build.opensuse.org/request/show/744913
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-lua-ev?expand=0&rev=1
This commit is contained in:
2019-11-02 19:42:53 +00:00
committed by Git OBS Bridge
commit b570da5abf
6 changed files with 164 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

4
_multibuild Normal file
View File

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

BIN
lua-ev-1.5.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

4
lua-lua-ev.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sat Nov 2 18:01:04 CET 2019 - Matej Cepl <mcepl@suse.com>
- Initial packaging effort of lua-ev 1.5.

129
lua-lua-ev.spec Normal file
View File

@@ -0,0 +1,129 @@
#
# spec file for package lua-lua-ev
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Togan Muftuoglu toganm@opensuse.org
#
# 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 lua-ev
%define lua_value %(echo "%{flavor}" |sed -e 's:lua::')
%define upversion 1.5
%define libev_sover 1
%bcond_with public_lib
Version: 1.5
Release: 0
Summary: Lua integration with libev
License: MIT
URL: https://github.com/brimworks/lua-ev
Source: https://github.com/brimworks/%{mod_name}/archive/v%{upversion}.tar.gz#/%{mod_name}-%{upversion}.tar.gz
BuildRequires: cmake
BuildRequires: libev-devel
BuildRequires: lua-macros
BuildRequires: %{flavor}-devel
# BuildRequires: %%{flavor}-luafilesystem
Requires: %{flavor}
%if "%{flavor}" == ""
Name: lua-%{mod_name}
ExclusiveArch: do_not_build
%else
Name: %{flavor}-%{mod_name}
%endif
%description
Lua integration with libev (http://dist.schmorp.de/libev)
%package devel
Summary: Header files for %{flavor}-%{mod_name}
Group: Development/Languages/Other
Requires: %{flavor}-%{mod_name} = %{version}
%if %{with public_lib}
Requires: %{flavor}-libev%{libev_sover}
%endif
%description devel
This subpackage contains header files for developing applications that
want to make use of %{flavor}-%{mod_name}.
%if %{with public_lib}
%package -n %{flavor}-libev%{libev_sover}
Summary: Lua bindings for libev as a library
Group: System/Libraries
%description -n %{flavor}-libev%{libev_sover}
This library makes libev available to lua scripts. It was made
for the luvit project but should usable from nearly any lua
project.
%post -n %{flavor}-libev%{libev_sover} -p /sbin/ldconfig
%postun -n %{flavor}-libev%{libev_sover} -p /sbin/ldconfig
%endif
%prep
%setup -q -n %{mod_name}-%{upversion}
# Remove bundled dependencies
rm -rf deps
# Remove network sensitive tests gh#luvit/luv#340
rm -fv tests/test-dns.lua
%build
%if %{with public_lib}
# Build libev.so shared library
cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=ON
( cd build ; make )
mv build/ev.so build/libev.so.%{libev_sover}
%endif
# Build ev.so module
cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=ON
( cd build ; make )
%install
install -v -D -m 0755 -p -t %{buildroot}%{lua_archdir} build/ev.so
%if %{with public_lib}
install -v -m 0755 -p -t %{buildroot}%{lua_archdir} build/libev*
ln -sf libev.so.* %{buildroot}%{lua_archdir}/libev.so
%endif
install -v -D -m 0644 -p -t %{buildroot}%{lua_incdir}/%{mod_name} *.h
%check
cd build
make test
%files
%doc README example.lua
%{lua_archdir}/ev.so
%files devel
%dir %{lua_incdir}/%{mod_name}
%{lua_incdir}/%{mod_name}/*
%if %{with public_lib}
%{lua_archdir}/libev.so
%files -n %{flavor}-libev%{libev_sover}
%{lua_archdir}/libev.so.*
%endif
%changelog