[packages/libmpack] Up to 1.0.5; lua bindings are now separate at https://github.com/libmpack/libmpack-lua

arekm arekm at pld-linux.org
Sun Mar 15 12:04:22 CET 2026


commit f64a7c9b5a99ed2371225e972f3e8be33e835aed
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Mar 15 12:03:37 2026 +0100

    Up to 1.0.5; lua bindings are now separate at https://github.com/libmpack/libmpack-lua

 libmpack.spec | 61 +++++++++++++++++------------------------------------------
 lua.patch     | 18 ------------------
 2 files changed, 17 insertions(+), 62 deletions(-)
---
diff --git a/libmpack.spec b/libmpack.spec
index eb8cd6a..640a818 100644
--- a/libmpack.spec
+++ b/libmpack.spec
@@ -1,29 +1,18 @@
 #
 # Conditional build:
-%bcond_without	lua		# build without tests
-
-%define	__lua	/usr/bin/lua5.1
-#define	luaver %(%{__lua} -e "print(string.sub(_VERSION, 5))")
-%define	luaver 5.1
-%define	lualibdir %{_libdir}/lua/%{luaver}
-%define	luapkgdir %{_datadir}/lua/%{luaver}
-
+%bcond_without	tests		# unit tests
+#
 Summary:	Simple implementation of msgpack in C
 Name:		libmpack
-Version:	1.0.3
-Release:	2
+Version:	1.0.5
+Release:	1
 License:	MIT
 Group:		Development/Libraries
-Source0:	https://github.com/tarruda/libmpack/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	7d855d6f989686fae713c10f202f5a1b
-Patch0:		lua.patch
-URL:		https://github.com/tarruda/libmpack/
+Source0:	https://github.com/libmpack/libmpack/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	ac4b25bfd0a07003ed8dac9c6dc851a6
+URL:		https://github.com/libmpack/libmpack/
 BuildRequires:	libtool
 BuildRequires:	pkgconfig
-%if %{with lua}
-BuildRequires:	lua51
-BuildRequires:	lua51-devel >= %{luaver}
-%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -47,18 +36,8 @@ Requires:	%{name} = %{version}-%{release}
 %description devel
 Header files for %{name} library.
 
-%package -n lua-mpack
-Summary:	Lua binding to libmpack
-Group:		Development/Languages
-# does not link with libmpack.so
-#Requires:	%{name} = %{version}-%{release}
-
-%description -n lua-mpack
-Lua binding to libmpack.
-
 %prep
 %setup -q
-%patch -P0 -p1
 
 %build
 %{__make} config=release \
@@ -67,13 +46,16 @@ Lua binding to libmpack.
 	CFLAGS="%{rpmcflags}" \
 	LDFLAGS="%{rpmldflags}" \
 	LIBDIR=%{_libdir} \
-	VERBOSE=1
+	VERBOSE=1 \
+	PATCH=5
 
-%if %{with lua}
-CFLAGS="%{rpmcflags}" \
-%{__make} -C binding/lua \
+%if %{with tests}
+%{__make} test \
 	CC="%{__cc}" \
-	USE_SYSTEM_LUA=yes
+	CFLAGS="%{rpmcflags}" \
+	LDFLAGS="%{rpmldflags}" \
+	VERBOSE=1 \
+	PATCH=5
 %endif
 
 %install
@@ -81,13 +63,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	PREFIX=%{_prefix} \
 	LIBDIR=%{_libdir} \
-	DESTDIR=$RPM_BUILD_ROOT
-
-%if %{with lua}
-%{__make} -C binding/lua install \
-	USE_SYSTEM_LUA=yes \
-	DESTDIR=$RPM_BUILD_ROOT
-%endif
+	DESTDIR=$RPM_BUILD_ROOT \
+	PATCH=5
 
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmpack.a
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmpack.la
@@ -109,7 +86,3 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libmpack.so
 %{_includedir}/mpack.h
 %{_pkgconfigdir}/mpack.pc
-
-%files -n lua-mpack
-%defattr(644,root,root,755)
-%attr(755,root,root) %{lualibdir}/mpack.so
diff --git a/lua.patch b/lua.patch
deleted file mode 100644
index f233cf3..0000000
--- a/lua.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- libmpack-1.0.2/binding/lua/Makefile~	2016-09-17 14:54:37.000000000 +0300
-+++ libmpack-1.0.2/binding/lua/Makefile	2016-09-17 14:54:46.623394052 +0300
-@@ -33,12 +33,12 @@
- 	-Wstrict-prototypes -Wno-unused-parameter -pedantic
- CFLAGS += -fPIC -DMPACK_DEBUG_REGISTRY_LEAK
- 
--LUA_INCLUDE := $(shell $(PKG_CONFIG) --cflags lua-$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-I/usr/include/lua$(LUA_VERSION_MAJ_MIN)")
--LUA_LIB := $(shell $(PKG_CONFIG) --libs lua-$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-llua$(LUA_VERSION_MAJ_MIN)")
-+LUA_INCLUDE := $(shell $(PKG_CONFIG) --cflags lua$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-I/usr/include/lua$(LUA_VERSION_MAJ_MIN)")
-+LUA_LIB := $(shell $(PKG_CONFIG) --libs lua$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "-llua$(LUA_VERSION_MAJ_MIN)")
- INCLUDES = $(LUA_INCLUDE)
- LIBS = $(LUA_LIB)
- 
--LUA_CMOD_INSTALLDIR := $(shell $(PKG_CONFIG) --variable=INSTALL_CMOD lua-$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "/usr/lib/lua/$(LUA_VERSION_MAJ_MIN)")
-+LUA_CMOD_INSTALLDIR := $(shell $(PKG_CONFIG) --variable=INSTALL_CMOD lua$(LUA_VERSION_MAJ_MIN) 2>/dev/null || echo "/usr/lib/lua/$(LUA_VERSION_MAJ_MIN)")
- 
- 
- # Misc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmpack.git/commitdiff/f64a7c9b5a99ed2371225e972f3e8be33e835aed



More information about the pld-cvs-commit mailing list