commit 0667f6300ffc575115f6a21b4c7ef65a875aac02a2055af1c10aa58dd29a70d3 Author: Tomáš Chvátal Date: Fri Jul 14 11:02:20 2017 +0000 osc copypac from project:devel:languages:lua package:lua51-mpack revision:7, using expand OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-mpack?expand=0&rev=1 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/1.0.6.tar.gz b/1.0.6.tar.gz new file mode 100644 index 0000000..4b5c2d2 --- /dev/null +++ b/1.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66811e30b316b53d1e3c4225248d4813b8b852c3e19121ba5ad47a9d4537d1ae +size 14557 diff --git a/libmpack-1.0.5.tar.gz b/libmpack-1.0.5.tar.gz new file mode 100644 index 0000000..ab3c2c8 --- /dev/null +++ b/libmpack-1.0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ce91395d81ccea97d3ad4cb962f8540d166e59d3e2ddce8a22979b49f108956 +size 32966 diff --git a/lua51-mpack-fix-compilation.patch b/lua51-mpack-fix-compilation.patch new file mode 100644 index 0000000..d39d547 --- /dev/null +++ b/lua51-mpack-fix-compilation.patch @@ -0,0 +1,13 @@ +Index: libmpack-lua-1.0.6/Makefile +=================================================================== +--- libmpack-lua-1.0.6.orig/Makefile ++++ libmpack-lua-1.0.6/Makefile +@@ -99,7 +99,7 @@ $(MPACK): $(LUAROCKS) mpack-src lmpack.c + $(LUAROCKS) make CFLAGS='$(CFLAGS)' + else + $(MPACK): mpack-src lmpack.c +- $(CC) -shared $(CFLAGS) $(INCLUDES) $(LDFLAGS) $^ -o $@ $(LIBS) ++ $(CC) -shared $(CFLAGS) $(INCLUDES) $(LDFLAGS) lmpack.c -o $@ $(LIBS) + endif + + $(BUSTED): $(LUAROCKS) diff --git a/lua51-mpack-fix-gcc7.patch b/lua51-mpack-fix-gcc7.patch new file mode 100644 index 0000000..c6fdf40 --- /dev/null +++ b/lua51-mpack-fix-gcc7.patch @@ -0,0 +1,14 @@ +Index: libmpack-lua-1.0.6/lmpack.c +=================================================================== +--- libmpack-lua-1.0.6.orig/lmpack.c ++++ libmpack-lua-1.0.6/lmpack.c +@@ -689,6 +689,7 @@ static void lmpack_unparse_enter(mpack_p + node->tok = mpack_pack_nil(); + break; + } ++ /* Fallthrough */ + default: + luaL_error(L, "can't serialize object"); + } + +%changelog diff --git a/lua51-mpack.changes b/lua51-mpack.changes new file mode 100644 index 0000000..1ae5879 --- /dev/null +++ b/lua51-mpack.changes @@ -0,0 +1,47 @@ +------------------------------------------------------------------- +Tue Jul 4 16:57:57 UTC 2017 - ronisbr@gmail.com + +- Fix compilation in openSUSE Leap 42.3. + +------------------------------------------------------------------- +Thu Jun 1 17:13:03 UTC 2017 - ronisbr@gmail.com + +- Run spec-cleaner. +- Version bump to 1.0.6. + Upstream changelog: + + Version 1.0.6 + ============= + + * It seems luarocks.orgs caches a previously uploaded rockspec + for a version, even if we explicitly delete the version. + + Version 1.0.5 + ============= + + * Bump and adapt build scripts for repository transfer. + +- Adapt .spec because the upstream repository changed. + * libmpack was split into libmpack and libmpack-lua. Hence, now + we need to download libmpack source code and unpack it into the + folder mpack-src to build libmapck-lua. Thus, the file + `libmpack-1.0.5.tar.gz` that contains libmpack v1.0.5 source + code was added. +- Add patch `lua51-mpack-fix-compilation.patch` to fix a + compilation problem when using `USE_SYSTEM_LUA=1`. For more + information, see gh#libmpack/libmpack-lua#2 . +- Add patch `lua51-mpack-fix-gcc7.patch` to fix a compilation + failure when using GCC7. For more information, see + gh#libmpack/libmpack-lua#3 . + +------------------------------------------------------------------- +Sat Oct 8 23:48:19 UTC 2016 - ronisbr@gmail.com + +- Version bump to 1.0.3. + * No changelog available. + +------------------------------------------------------------------- +Fri Apr 22 00:50:42 UTC 2016 - ronisbr@gmail.com + +- Initial version. + diff --git a/lua51-mpack.spec b/lua51-mpack.spec new file mode 100644 index 0000000..4650bb0 --- /dev/null +++ b/lua51-mpack.spec @@ -0,0 +1,81 @@ +# +# spec file for package lua51-mpack +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + + +%define lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2) +%define lua_archdir %{_libdir}/lua/%{lua_version} +%define libmpack_version 1.0.5 +Name: lua51-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 +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 +# 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: gcc +BuildRequires: libtool +BuildRequires: lua51-devel +Requires: lua51 + +%description + +mpack is a small binary serialization/RPC library that implements +both the msgpack and msgpack-rpc specifications. + +%prep +%setup -q -n libmpack-lua-%{version} +%patch0 -p1 +%patch1 -p1 + +# Extract the libmpack source to the right directory. +mkdir -p mpack-src +pushd mpack-src +cp %{SOURCE1} ./ +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 + +%build +make %{?_smp_mflags} USE_SYSTEM_LUA=yes + +%install +make USE_SYSTEM_LUA=yes \ + DESTDIR=%{buildroot} \ + install + +%files +%defattr(-,root,root) +%doc mpack-src/LICENSE-MIT README.md +%dir %{lua_archdir} +%{lua_archdir}/* + +%changelog