From 7d11cdce105e8876428792eafc415d4650dfc063fb97f0bf9313f5b1550aaca0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 3 Aug 2019 21:52:41 +0000 Subject: [PATCH] Accepting request 720829 from home:mcepl:neovim No public library. OBS-URL: https://build.opensuse.org/request/show/720829 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-luv?expand=0&rev=6 --- lua-luv.changes | 5 +++++ lua-luv.spec | 27 ++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lua-luv.changes b/lua-luv.changes index 56c128a..eb7abe2 100644 --- a/lua-luv.changes +++ b/lua-luv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 3 18:08:08 BST 2019 - Matej Cepl + +- Remove public shared library again. + ------------------------------------------------------------------- Sun Jul 7 19:38:27 CEST 2019 - Matej Cepl diff --git a/lua-luv.spec b/lua-luv.spec index 6847ca4..7bbbfbd 100644 --- a/lua-luv.spec +++ b/lua-luv.spec @@ -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 toganm@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 @@ 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 -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 @@ Requires: %{flavor}-libluv%{libluv_sover} 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 @@ project. %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 -rf deps 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 @@ cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \ -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 @@ cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \ -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 @@ lua tests/run.lua %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