3 %bcond_without tests # build without tests
5 %define __lua /usr/bin/lua5.1
7 %define lualibdir %{_libdir}/lua/%{luaver}
8 Summary: C extension module for Lua which adds bitwise operations on numbers
13 Group: Development/Libraries
14 Source0: http://bitop.luajit.org/download/LuaBitOp-%{version}.tar.gz
15 # Source0-md5: d0c1080fe0c844e8477279668e2d0d06
16 URL: http://bitop.luajit.org/
17 BuildRequires: lua51 >= %{luaver}
18 BuildRequires: lua51-devel >= %{luaver}
19 BuildRequires: pkgconfig
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise
24 operations on numbers.
26 Supported functions: bit.tobit, bit.tohex, bit.bnot, bit.band,
27 bit.bor, bit.bxor, bit.lshift, bit.rshift, bit.arshift, bit.rol,
31 %setup -q -n LuaBitOp-%{version}
34 %{__make} all %{?with_tests:test} \
35 INCLUDES=$(pkg-config --cflags lua%{luaver}) \
37 CCOPT="%{rpmcflags} -fomit-frame-pointer" \
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{lualibdir}
43 install -p bit.so $RPM_BUILD_ROOT%{lualibdir}
46 rm -rf $RPM_BUILD_ROOT
49 %defattr(644,root,root,755)
51 %attr(755,root,root) %{lualibdir}/bit.so