commit lua-luv for openSUSE:Factory

2020-07-15 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2020-07-15 14:55:33

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.3060 (New)


Package is "lua-luv"

Wed Jul 15 14:55:33 2020 rev:7 rq:819769 version:1.30.1

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2020-04-13 
12:53:43.712659668 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.3060/lua-luv.changes
2020-07-15 14:55:39.854856640 +0200
@@ -1,0 +2,6 @@
+Mon Jul  6 19:06:47 UTC 2020 - Matej Cepl 
+
+- Add lua54 as new build target and fix problems with
+  compatibility with it.
+
+---



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.cJu4Ch/_old  2020-07-15 14:55:40.890857706 +0200
+++ /var/tmp/diff_new_pack.cJu4Ch/_new  2020-07-15 14:55:40.894857709 +0200
@@ -61,9 +61,7 @@
 BuildRequires:  %{flavor}-devel
 BuildRequires:  %{flavor}-luafilesystem
 Requires:   %{flavor}
-%if "%{flavor}" == "lua51"
 BuildRequires:  %{flavor}-compat-5.3
-%endif
 # not SUSE
 %else
 BuildRequires:  lua-devel
@@ -132,6 +130,7 @@
 -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_DO_STRIP=OFF \
 -DBUILD_MODULE=OFF -DBUILD_SHARED_LIBS=ON \
 -DWITH_SHARED_LIBUV=ON -DWITH_LUA_ENGINE=Lua \
+-DLUA_INCLUDE_DIR:PATH="%{lua_incdir}" \
 -DLUA_BUILD_TYPE=System -DLUA_COMPAT53_DIR="%{lua_incdir}/"
 ( cd build ; make )
 %endif
@@ -143,6 +142,7 @@
 -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_DO_STRIP=OFF \
 -DBUILD_MODULE=ON -DBUILD_SHARED_LIBS=ON \
 -DWITH_SHARED_LIBUV=ON -DWITH_LUA_ENGINE=Lua \
+-DLUA_INCLUDE_DIR:PATH="%{lua_incdir}" \
 -DLUA_BUILD_TYPE=System -DLUA_COMPAT53_DIR="%{lua_incdir}/"
 ( cd build ; make )
 

++ _multibuild ++
--- /var/tmp/diff_new_pack.cJu4Ch/_old  2020-07-15 14:55:40.922857738 +0200
+++ /var/tmp/diff_new_pack.cJu4Ch/_new  2020-07-15 14:55:40.922857738 +0200
@@ -1,4 +1,5 @@
 
 lua51
 lua53
+lua54
 




commit lua-luv for openSUSE:Factory

2020-04-13 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2020-04-13 12:53:40

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.3248 (New)


Package is "lua-luv"

Mon Apr 13 12:53:40 2020 rev:6 rq:793422 version:1.30.1

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2020-04-08 
19:57:04.989140904 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.3248/lua-luv.changes
2020-04-13 12:53:43.712659668 +0200
@@ -1,0 +2,11 @@
+Sun Apr 12 12:30:52 UTC 2020 - Matej Cepl 
+
+- We don't need to define macros, when lua-macros is finally
+  fixed.
+
+---
+Sat Apr 11 07:01:18 UTC 2020 - Matej Cepl 
+
+- Better version of the patch, based upon the upstream advice.
+
+---



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.8L6wkq/_old  2020-04-13 12:53:45.108660276 +0200
+++ /var/tmp/diff_new_pack.8L6wkq/_new  2020-04-13 12:53:45.108660276 +0200
@@ -33,10 +33,6 @@
 %endif
 %if 0%{?fedora} || 0%{?rhel}
 %define flavor lua
-%define lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2)
-%define lua_archdir %{_libdir}/lua/%{lua_version}
-%define lua_noarchdir %{_datadir}/lua/%{lua_version}
-%define lua_incdir %{_includedir}/lua%{lua_version}
 %endif
 %bcond_with public_lib
 %define lua_value  %(echo "%{flavor}" |sed -e 's:lua::')
@@ -119,10 +115,7 @@
 %prep
 echo "Name is %{name}, Flavor is %{flavor}"
 %setup -q -n %{mod_name}-%{upver}
-# gh#luvit/luv#473
-%if 0%{?sle_version}
-%patch0 -p1
-%endif
+%autopatch -p1
 
 # Remove bundled dependencies
 rm -rf deps
@@ -156,11 +149,13 @@
 find build -name \*.so\*
 
 %install
-install -v -D -m 0755 -p -t %{buildroot}%{lua_archdir} build/luv.so
+install -v -D -m 0755 -p build/luv.so %{buildroot}%{lua_archdir}/luv.so
 %if %{with public_lib}
-install -v -m 0755 -p -t %{buildroot}%{lua_archdir} build/libluv*
+mkdir -p %{buildroot}%{lua_archdir}/
+install -v -m 0755 -p build/libluv* %{buildroot}%{lua_archdir}/
 %endif
-install -v -D -m 0644 -p -t %{buildroot}%{lua_incdir}/%{mod_name} src/*.h
+mkdir -p %{buildroot}%{lua_incdir}/%{mod_name}
+install -v -m 0644 -p src/*.h %{buildroot}%{lua_incdir}/%{mod_name}/
 
 # For %%doc
 cp -rv lib/ examples/

++ skip-failing-test.patch ++
--- /var/tmp/diff_new_pack.8L6wkq/_old  2020-04-13 12:53:45.148660294 +0200
+++ /var/tmp/diff_new_pack.8L6wkq/_new  2020-04-13 12:53:45.148660294 +0200
@@ -1,31 +1,14 @@
 --- a/tests/test-thread.lua
 +++ b/tests/test-thread.lua
-@@ -58,28 +58,4 @@ return require('lib/tap')(function (test
- assert(elapsed >= delay, "elapsed should be at least delay ")
+@@ -59,6 +59,11 @@ return require('lib/tap')(function (test
end)
  
--  test("test thread create with options table", function(print, p, expect, uv)
--local delay = 100
--uv.update_time()
--local before = uv.now()
--local args = {delay, 'string', nil, false, 5, "helloworld"}
--local unpack = unpack or table.unpack
--uv.new_thread({stack_size=0}, function(delay,s,null,bool,five,hw)
--  assert(type(delay) == "number")
--  assert(type(s) == "string")
--  assert(null == nil)
--  assert(bool == false)
--  assert(five == 5)
--  assert(hw == 'helloworld')
--  require('luv').sleep(delay)
--end, unpack(args)):join()
--uv.update_time()
--local elapsed = uv.now() - before
--p({
--  delay = delay,
--  elapsed = elapsed
--})
--assert(elapsed >= 100, "elapsed should be at least delay ")
--  end)
--
- end)
+   test("test thread create with options table", function(print, p, expect, uv)
++local version = 0x1 + 26*0x100 + 0
++if uv.version() < version then
++  print("skipped, requires libuv >= 1.26.0")
++  return
++end
+ local delay = 100
+ uv.update_time()
+ local before = uv.now()




commit lua-luv for openSUSE:Factory

2020-04-08 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2020-04-08 19:57:01

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.3248 (New)


Package is "lua-luv"

Wed Apr  8 19:57:01 2020 rev:5 rq:792456 version:1.30.1

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2019-09-20 
14:54:53.102862445 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.3248/lua-luv.changes
2020-04-08 19:57:04.989140904 +0200
@@ -1,0 +2,6 @@
+Wed Apr  8 12:10:44 UTC 2020 - Matej Cepl 
+
+- Add skip-failing-test.patch to failing test on Leap 15
+  (gh#luvit/luv#473)
+
+---

New:

  skip-failing-test.patch



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.QCZLPa/_old  2020-04-08 19:57:05.733141448 +0200
+++ /var/tmp/diff_new_pack.QCZLPa/_new  2020-04-08 19:57:05.737141451 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lua-luv
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2012 Togan Muftuoglu tog...@opensuse.org
 #
 # All modifications and additions to the file contributed by third parties
@@ -17,13 +17,29 @@
 #
 
 
-%define flavor @BUILD_FLAVOR@
 %define mod_name luv
-%define lua_value  %(echo "%{flavor}" |sed -e 's:lua::')
 %define upver 1.30.1-1
 %define libluv_sover 1
+%if 0%{?suse_version}
+%define flavor @BUILD_FLAVOR@
+%else
+%define flavor lua
+%endif
+%if 0%{?rhel}
+%define __cmake cmake3
+BuildRequires:  cmake3
+%else
+BuildRequires:  cmake
+%endif
+%if 0%{?fedora} || 0%{?rhel}
+%define flavor lua
+%define lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2)
+%define lua_archdir %{_libdir}/lua/%{lua_version}
+%define lua_noarchdir %{_datadir}/lua/%{lua_version}
+%define lua_incdir %{_includedir}/lua%{lua_version}
+%endif
 %bcond_with public_lib
-
+%define lua_value  %(echo "%{flavor}" |sed -e 's:lua::')
 %if "%{flavor}" == ""
 Name:   lua-%{mod_name}
 ExclusiveArch:  do_not_build
@@ -37,19 +53,29 @@
 Group:  Development/Languages/Other
 URL:https://github.com/luvit/luv
 Source: 
https://github.com/luvit/%{mod_name}/archive/%{upver}.tar.gz#/%{mod_name}-%{upver}.tar.gz
-BuildRequires:  cmake
+# PATCH-FIX-UPSTREAM skip-failing-test.patch gh#luvit/luv#473 mc...@suse.com
+# skip failing test thread - test thread create with options table
+Patch0: skip-failing-test.patch
 BuildRequires:  libuv-devel
 BuildRequires:  lua-macros
+%if 0%{?suse_version} && "%{flavor}" == "lua"
+ExclusiveArch:  do_not_build
+%endif
 %if 0%{?suse_version}
-BuildRequires:  %{flavor}-compat-5.3
 BuildRequires:  %{flavor}-devel
 BuildRequires:  %{flavor}-luafilesystem
 Requires:   %{flavor}
+%if "%{flavor}" == "lua51"
+BuildRequires:  %{flavor}-compat-5.3
+%endif
+# not SUSE
 %else
-BuildRequires:  lua-compat53
 BuildRequires:  lua-devel
 BuildRequires:  lua-filesystem
-%endif # suse_version
+%endif
+%if 0%{?rhel}
+BuildRequires:  lua-compat53
+%endif
 
 %description
 This library makes libuv available to lua scripts. It was made
@@ -91,7 +117,12 @@
 %endif
 
 %prep
+echo "Name is %{name}, Flavor is %{flavor}"
 %setup -q -n %{mod_name}-%{upver}
+# gh#luvit/luv#473
+%if 0%{?sle_version}
+%patch0 -p1
+%endif
 
 # Remove bundled dependencies
 rm -rf deps
@@ -102,7 +133,7 @@
 %build
 %if %{with public_lib}
 # Build libluv.so shared library
-cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
+%{__cmake} -H. -Bbuild -DCMAKE_C_FLAGS="%{optflags}" \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
 -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_DO_STRIP=OFF \
@@ -113,7 +144,7 @@
 %endif
 
 # Build luv.so module
-cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
+%{__cmake} -H. -Bbuild -DCMAKE_C_FLAGS="%{optflags}" \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
 -DBUILD_STATIC_LIBS=OFF -DCMAKE_INSTALL_DO_STRIP=OFF \

++ skip-failing-test.patch ++
--- a/tests/test-thread.lua
+++ b/tests/test-thread.lua
@@ -58,28 +58,4 @@ return require('lib/tap')(function (test
 assert(elapsed >= delay, "elapsed should be at least delay ")
   end)
 
-  test("test thread create with options table", function(print, p, expect, uv)
-local delay = 100
-uv.update_time()
-local before = uv.now()
-local args = {delay, 'string', nil, false, 5, "helloworld"}
-local unpack = unpack or table.unpack
-uv.new_thread({stack_size=0}, function(delay,s,null,bool,five,hw)
-  assert(type(delay) == "number")
-  assert(type(s) == "string")
-  assert(null == nil)
-  

commit lua-luv for openSUSE:Factory

2019-09-20 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2019-09-20 14:54:49

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.7948 (New)


Package is "lua-luv"

Fri Sep 20 14:54:49 2019 rev:4 rq:731966 version:1.30.1

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2019-08-13 
13:27:20.337322472 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.7948/lua-luv.changes
2019-09-20 14:54:53.102862445 +0200
@@ -1,0 +2,6 @@
+Thu Sep 19 15:33:38 CEST 2019 - Matej Cepl 
+
+- Update to 1.30.1-1: mostly bugfixes. Full log is only
+  https://github.com/luvit/luv/commits/master
+
+---

Old:

  luv-1.30.0-0.tar.gz

New:

  luv-1.30.1-1.tar.gz



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.rXgsWi/_old  2019-09-20 14:54:54.134862239 +0200
+++ /var/tmp/diff_new_pack.rXgsWi/_new  2019-09-20 14:54:54.142862238 +0200
@@ -20,11 +20,17 @@
 %define flavor @BUILD_FLAVOR@
 %define mod_name luv
 %define lua_value  %(echo "%{flavor}" |sed -e 's:lua::')
-%define upver 1.30.0-0
+%define upver 1.30.1-1
 %define libluv_sover 1
 %bcond_with public_lib
 
-Version:1.30.0
+%if "%{flavor}" == ""
+Name:   lua-%{mod_name}
+ExclusiveArch:  do_not_build
+%else
+Name:   %{flavor}-%{mod_name}
+%endif
+Version:1.30.1
 Release:0
 Summary:Bare libuv bindings for lua
 License:Apache-2.0
@@ -44,12 +50,6 @@
 BuildRequires:  lua-devel
 BuildRequires:  lua-filesystem
 %endif # suse_version
-%if "%{flavor}" == ""
-Name:   lua-%{mod_name}
-ExclusiveArch:  do_not_build
-%else
-Name:   %{flavor}-%{mod_name}
-%endif
 
 %description
 This library makes libuv available to lua scripts. It was made

++ luv-1.30.0-0.tar.gz -> luv-1.30.1-1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luv-1.30.0-0/.ci/install.bat 
new/luv-1.30.1-1/.ci/install.bat
--- old/luv-1.30.0-0/.ci/install.bat2019-06-29 13:04:12.0 +0200
+++ new/luv-1.30.1-1/.ci/install.bat2019-09-05 02:39:51.0 +0200
@@ -25,7 +25,7 @@
 :: Now we declare a scope
 Setlocal EnableDelayedExpansion EnableExtensions
 
-if not defined LUAROCKS_URL set 
LUAROCKS_URL=https://keplerproject.github.io/luarocks/releases
+if not defined LUAROCKS_URL set 
LUAROCKS_URL=https://luarocks.github.io/luarocks/releases
 if not defined LUAROCKS_REPO set LUAROCKS_REPO=https://luarocks.org
 if not defined LUA_URL set LUA_URL=http://www.lua.org/ftp
 if defined NOCOMPAT (
@@ -164,9 +164,9 @@
 
cd downloads\luarocks-%LUAROCKS_VER%-win32
if "%Configuration%"=="MinGW" (
-   call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P 
"%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" /MW
+   call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P 
"%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" /CONFIG "%LUAROCKS_INSTALL%" /MW
) else (
-   call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P 
"%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%"
+   call install.bat /LUA %LUA_DIR% /Q /LV %LUA_SHORTV% /P 
"%LUAROCKS_INSTALL%" /TREE "%LR_SYSTREE%" /CONFIG "%LUAROCKS_INSTALL%"
)
 
:: Configures LuaRocks to instruct CMake the correct generator to use. 
Else, CMake will pick the highest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luv-1.30.0-0/.ci/make_rockspec.sh 
new/luv-1.30.1-1/.ci/make_rockspec.sh
--- old/luv-1.30.0-0/.ci/make_rockspec.sh   2019-06-29 13:04:12.0 
+0200
+++ new/luv-1.30.1-1/.ci/make_rockspec.sh   2019-09-05 02:39:51.0 
+0200
@@ -19,7 +19,7 @@
 # .tar.gz
 rm -rf luv-${version}
 mkdir -p luv-${version}/deps
-cp -r src cmake CMakeLists.txt LICENSE.txt README.md docs.md luv-${version}/
+cp -r src cmake CMakeLists.txt LICENSE.txt README.md docs.md libluv.pc.in 
luv-${version}/
 cp -r deps/libuv deps/lua-compat-5.3 deps/*.cmake deps/lua_one.c 
luv-${version}/deps/
 COPYFILE_DISABLE=true tar -czvf luv-${version}.tar.gz luv-${version}
 rm -rf luv-${version}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/luv-1.30.0-0/.ci/setup_lua.sh 
new/luv-1.30.1-1/.ci/setup_lua.sh
--- old/luv-1.30.0-0/.ci/setup_lua.sh   2019-06-29 13:04:12.0 +0200
+++ new/luv-1.30.1-1/.ci/setup_lua.sh   2019-09-05 02:39:51.0 +0200
@@ -6,7 +6,7 @@
 # luajit2.0 - master v2.0
 # luajit2.1 - master v2.1
 
-set -eufo pipefail
+set -eufxo pipefail
 
 LUAJIT_VERSION="2.0.4"
 LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION"
@@ -91,16 +91,25 @@
 
 cd "$LUAROCKS_BASE"
 
-if [

commit lua-luv for openSUSE:Factory

2019-08-13 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2019-08-13 13:27:18

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.9556 (New)


Package is "lua-luv"

Tue Aug 13 13:27:18 2019 rev:3 rq:722901 version:1.30.0

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2019-08-05 
10:42:21.575292086 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.9556/lua-luv.changes
2019-08-13 13:27:20.337322472 +0200
@@ -1,0 +2,6 @@
+Fri Aug  9 18:09:40 CEST 2019 - Matej Cepl 
+
+- devel package doesn’t need luv%{sover} package, when public
+  library is not built.
+
+---



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.poW5Nl/_old  2019-08-13 13:27:21.137322262 +0200
+++ /var/tmp/diff_new_pack.poW5Nl/_new  2019-08-13 13:27:21.141322261 +0200
@@ -68,7 +68,9 @@
 Summary:Header files for %{flavor}-%{mod_name}
 Group:  Development/Languages/Other
 Requires:   %{flavor}-%{mod_name} = %{version}
+%if %{with public_lib}
 Requires:   %{flavor}-libluv%{libluv_sover}
+%endif
 
 %description devel
 This subpackage contains header files for developing applications that




commit lua-luv for openSUSE:Factory

2019-08-05 Thread root
Hello community,

here is the log from the commit of package lua-luv for openSUSE:Factory checked 
in at 2019-08-05 10:42:04

Comparing /work/SRC/openSUSE:Factory/lua-luv (Old)
 and  /work/SRC/openSUSE:Factory/.lua-luv.new.4126 (New)


Package is "lua-luv"

Mon Aug  5 10:42:04 2019 rev:2 rq:720830 version:1.30.0

Changes:

--- /work/SRC/openSUSE:Factory/lua-luv/lua-luv.changes  2019-07-29 
17:25:45.262316359 +0200
+++ /work/SRC/openSUSE:Factory/.lua-luv.new.4126/lua-luv.changes
2019-08-05 10:42:21.575292086 +0200
@@ -1,0 +2,5 @@
+Sat Aug  3 18:08:08 BST 2019 - Matej Cepl 
+
+- Remove public shared library again.
+
+---



Other differences:
--
++ lua-luv.spec ++
--- /var/tmp/diff_new_pack.f6fG4T/_old  2019-08-05 10:42:22.159292018 +0200
+++ /var/tmp/diff_new_pack.f6fG4T/_new  2019-08-05 10:42:22.159292018 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package lua-penlight
+# spec file for package lua-luv
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2012 Togan Muftuoglu tog...@opensuse.org
 #
 # All modifications and additions to the file contributed by third parties
@@ -16,11 +16,13 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %define flavor @BUILD_FLAVOR@
 %define mod_name luv
 %define lua_value  %(echo "%{flavor}" |sed -e 's:lua::')
 %define upver 1.30.0-0
 %define libluv_sover 1
+%bcond_with public_lib
 
 Version:1.30.0
 Release:0
@@ -30,17 +32,17 @@
 URL:https://github.com/luvit/luv
 Source: 
https://github.com/luvit/%{mod_name}/archive/%{upver}.tar.gz#/%{mod_name}-%{upver}.tar.gz
 BuildRequires:  cmake
-BuildRequires:  lua-macros
 BuildRequires:  libuv-devel
+BuildRequires:  lua-macros
 %if 0%{?suse_version}
+BuildRequires:  %{flavor}-compat-5.3
 BuildRequires:  %{flavor}-devel
 BuildRequires:  %{flavor}-luafilesystem
-BuildRequires:  %{flavor}-compat-5.3
 Requires:   %{flavor}
 %else
+BuildRequires:  lua-compat53
 BuildRequires:  lua-devel
 BuildRequires:  lua-filesystem
-BuildRequires:  lua-compat53
 %endif # suse_version
 %if "%{flavor}" == ""
 Name:   lua-%{mod_name}
@@ -72,6 +74,7 @@
 This subpackage contains header files for developing applications that
 want to make use of %{flavor}-%{mod_name}.
 
+%if %{with public_lib}
 %package -n %{flavor}-libluv%{libluv_sover}
 Summary:Lua bindings for libluv as a library
 Group:  System/Libraries
@@ -83,7 +86,7 @@
 
 %post -n %{flavor}-libluv%{libluv_sover} -p /sbin/ldconfig
 %postun -n %{flavor}-libluv%{libluv_sover} -p /sbin/ldconfig
-
+%endif
 
 %prep
 %setup -q -n %{mod_name}-%{upver}
@@ -95,7 +98,8 @@
 rm -fv tests/test-dns.lua
 
 %build
-# Build luv.so module
+%if %{with public_lib}
+# Build libluv.so shared library
 cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
@@ -104,8 +108,9 @@
 -DWITH_SHARED_LIBUV=ON -DWITH_LUA_ENGINE=Lua \
 -DLUA_BUILD_TYPE=System -DLUA_COMPAT53_DIR="%{lua_incdir}/"
 ( cd build ; make )
+%endif
 
-# # Build libluv.so shared library
+# Build luv.so module
 cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
@@ -115,11 +120,13 @@
 -DLUA_BUILD_TYPE=System -DLUA_COMPAT53_DIR="%{lua_incdir}/"
 ( cd build ; make )
 
-ls -l build
+find build -name \*.so\*
 
 %install
 install -v -D -m 0755 -p -t %{buildroot}%{lua_archdir} build/luv.so
+%if %{with public_lib}
 install -v -m 0755 -p -t %{buildroot}%{lua_archdir} build/libluv*
+%endif
 install -v -D -m 0644 -p -t %{buildroot}%{lua_incdir}/%{mod_name} src/*.h
 
 # For %%doc
@@ -138,9 +145,11 @@
 %license LICENSE.txt
 %dir %{lua_incdir}/%{mod_name}
 %{lua_incdir}/%{mod_name}/*
+%if %{with public_lib}
 %{lua_archdir}/libluv.so
 
 %files -n %{flavor}-libluv%{libluv_sover}
 %{lua_archdir}/libluv.so.*
+%endif
 
 %changelog