1 %global real_version 1.36.0
2 %global extra_version 0
3 Summary: Bare libuv bindings for lua
5 Version: %{real_version}.%{extra_version}
9 BuildRequires: libuv-devel
10 BuildRequires: lua-devel >= 5.4
11 Source0: https://github.com/luvit/luv/archive/%{real_version}-%{extra_version}/luv-%{version}.tar.gz
12 # Source0-md5: 5b9efde8652056faeb5ffc8f62f2b595
13 Patch0: luv-1.36.0-lua-5.4.patch
14 URL: https://github.com/luvit/luv
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 This library makes libuv available to lua scripts. It was made for the
19 luvit project but should usable from nearly any lua project.
21 The library can be used by multiple threads at once. Each thread is
22 assumed to load the library from a different lua_State. Luv will
23 create a unique uv_loop_t for each state. You can't share uv handles
26 The best docs currently are the libuv docs themselves. Hopefully soon
27 we'll have a copy locally tailored for lua.
30 Summary: Development files for lua-luv
31 Requires: lua-luv = %{version}-%{release}
34 Files required for lua-luv development
37 %autosetup -p1 -n luv-%{real_version}-%{extra_version}
39 # Remove bundled dependencies
41 # Remove network sensitive tests gh#luvit/luv#340
42 rm -f tests/test-dns.lua
48 -DWITH_SHARED_LIBUV=ON \
50 -DBUILD_SHARED_LIBS=ON \
51 -DWITH_LUA_ENGINE=Lua \
52 -DLUA_BUILD_TYPE=System \
53 -DINSTALL_LIB_DIR=%{_libdir} \
54 -DLUA_INCLUDE_DIR=%{_includedir}/lua5.4 \
61 ln -sfn build/luv.so luv.so
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.4
69 install -p build/luv.so $RPM_BUILD_ROOT%{_libdir}/lua/5.4/luv.so
71 install -d $RPM_BUILD_ROOT%{_includedir}/lua5.4/luv
72 for f in lhandle.h lreq.h luv.h util.h; do
73 install -m 0644 -p src/$f $RPM_BUILD_ROOT%{_includedir}/lua5.4/luv/$f
77 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
82 %attr(755,root,root) %{_libdir}/lua/5.4/luv.so
85 %defattr(644,root,root,755)
86 %dir %{_includedir}/lua5.4/luv
87 %{_includedir}/lua5.4/luv/lhandle.h
88 %{_includedir}/lua5.4/luv/lreq.h
89 %{_includedir}/lua5.4/luv/luv.h
90 %{_includedir}/lua5.4/luv/util.h