diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..b9bdec1 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + +lua51 +lua52 +lua53 + diff --git a/lua51-mpack.changes b/lua-mpack.changes similarity index 91% rename from lua51-mpack.changes rename to lua-mpack.changes index 1ae5879..39f7f1b 100644 --- a/lua51-mpack.changes +++ b/lua-mpack.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 14 11:10:45 UTC 2017 - tchvatal@suse.com + +- Switch to namespaced lua builds + ------------------------------------------------------------------- Tue Jul 4 16:57:57 UTC 2017 - ronisbr@gmail.com diff --git a/lua51-mpack.spec b/lua-mpack.spec similarity index 74% rename from lua51-mpack.spec rename to lua-mpack.spec index 4650bb0..b1f9741 100644 --- a/lua51-mpack.spec +++ b/lua-mpack.spec @@ -1,5 +1,5 @@ # -# spec file for package lua51-mpack +# spec file for package lua-mpack # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # @@ -16,33 +16,35 @@ # -%define lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2) -%define lua_archdir %{_libdir}/lua/%{lua_version} +%define flavor @BUILD_FLAVOR@ %define libmpack_version 1.0.5 -Name: lua51-mpack +Name: %{flavor}-mpack Version: 1.0.6 Release: 0 Summary: Implementation of MessagePack for Lua 5.1 License: MIT Group: Development/Libraries/Other Url: https://github.com/libmpack/libmpack-lua +# Building against system version is in works of upstream Master branch Source: https://github.com/libmpack/libmpack-lua/archive/%{version}.tar.gz # libmpack source is necessary to build lua51-mpack. # The latest source can be downloaded from: https://github.com/libmpack/libmpack -Source1: libmpack-%{libmpack_version}.tar.gz +Source1: https://github.com/libmpack/libmpack/archive/%{version}/libmpack-%{libmpack_version}.tar.gz # PATCH-FIX-UPSTREAM lua51-mpack-fix-gcc7.patch gh#libmpack/libmpack-lua#3 -- Fix compilation error when using GCC7. Patch0: lua51-mpack-fix-gcc7.patch # PATCH-FIX-UPSTREAM lua51-mpack-fix-compilation.patch gh#libmpack/libmpack-lua#2 -- Fix compilation error when using `USE_SYSTEM_LUA=1`. Patch1: lua51-mpack-fix-compilation.patch +BuildRequires: %{flavor}-devel BuildRequires: gcc BuildRequires: libtool -BuildRequires: lua51-devel -Requires: lua51 +Requires: %{flavor} +%if "%{flavor}" == "" +ExclusiveArch: do_not_build +%endif %description - -mpack is a small binary serialization/RPC library that implements -both the msgpack and msgpack-rpc specifications. +mpack is a binary serialization/RPC library that implements both the msgpack +and msgpack-rpc specifications. %prep %setup -q -n libmpack-lua-%{version} @@ -57,23 +59,15 @@ tar --strip-components=1 -xzf libmpack-%{libmpack_version}.tar.gz popd # Fix lua directory. -sed -i 's|LUA_CMOD_INSTALLDIR :=.*|LUA_CMOD_INSTALLDIR := $(shell echo "%{_libdir}/lua/%{lua_version}")|g' Makefile - -# Fix Lua 5.1 library name if we are building for Leap 42.3. -%if 0%{?leap_version} == 420300 -sed -i 's|LUA_LIB :=.*|LUA_LIB := -llua|g' Makefile -%endif +sed -i 's|LUA_CMOD_INSTALLDIR :=.*|LUA_CMOD_INSTALLDIR := $(shell echo "%{lua_archdir}")|g' Makefile %build make %{?_smp_mflags} USE_SYSTEM_LUA=yes %install -make USE_SYSTEM_LUA=yes \ - DESTDIR=%{buildroot} \ - install +%make_install USE_SYSTEM_LUA=yes %files -%defattr(-,root,root) %doc mpack-src/LICENSE-MIT README.md %dir %{lua_archdir} %{lua_archdir}/*