From b570da5abf6fd3ced99b815af3507dfb29d05a3c8717f0a523dd5a967c99cf6b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 2 Nov 2019 19:42:53 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++++ .gitignore | 1 + _multibuild | 4 ++ lua-ev-1.5.tar.gz | 3 ++ lua-lua-ev.changes | 4 ++ lua-lua-ev.spec | 129 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 164 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 lua-ev-1.5.tar.gz create mode 100644 lua-lua-ev.changes create mode 100644 lua-lua-ev.spec 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..a01285a --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + +lua51 +lua53 + diff --git a/lua-ev-1.5.tar.gz b/lua-ev-1.5.tar.gz new file mode 100644 index 0000000..d8d1a64 --- /dev/null +++ b/lua-ev-1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26ac116722a241bf59daf5315ce0ffe751c1babea9a146ffc0a389f1af3facca +size 25668 diff --git a/lua-lua-ev.changes b/lua-lua-ev.changes new file mode 100644 index 0000000..e6d2c4c --- /dev/null +++ b/lua-lua-ev.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat Nov 2 18:01:04 CET 2019 - Matej Cepl + +- Initial packaging effort of lua-ev 1.5. diff --git a/lua-lua-ev.spec b/lua-lua-ev.spec new file mode 100644 index 0000000..ce8c8a9 --- /dev/null +++ b/lua-lua-ev.spec @@ -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