]>
Commit | Line | Data |
---|---|---|
5e15440f ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
5 | %define __lua /usr/bin/lua5.1 | |
6 | %define luaver 5.1 | |
7 | %define lualibdir %{_libdir}/lua/%{luaver} | |
0cf7a05a | 8 | Summary: C extension module for Lua which adds bitwise operations on numbers |
5e15440f | 9 | Name: lua-bitop |
0cf7a05a ER |
10 | Version: 1.0.2 |
11 | Release: 1 | |
5e15440f ER |
12 | License: MIT |
13 | Group: Development/Libraries | |
14 | Source0: http://bitop.luajit.org/download/LuaBitOp-%{version}.tar.gz | |
0cf7a05a | 15 | # Source0-md5: d0c1080fe0c844e8477279668e2d0d06 |
5e15440f | 16 | URL: http://bitop.luajit.org/ |
c54caa50 ER |
17 | BuildRequires: lua51 >= %{luaver} |
18 | BuildRequires: lua51-devel >= %{luaver} | |
19 | BuildRequires: pkgconfig | |
5e15440f ER |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
0cf7a05a | 23 | Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise |
5e15440f ER |
24 | operations on numbers. |
25 | ||
26 | Supported functions: bit.tobit, bit.tohex, bit.bnot, bit.band, | |
27 | bit.bor, bit.bxor, bit.lshift, bit.rshift, bit.arshift, bit.rol, | |
28 | bit.ror, bit.bswap | |
29 | ||
30 | %prep | |
31 | %setup -q -n LuaBitOp-%{version} | |
32 | ||
33 | %build | |
34 | %{__make} all %{?with_tests:test} \ | |
35 | INCLUDES=$(pkg-config --cflags lua%{luaver}) \ | |
36 | LUA="%{__lua}" \ | |
0cf7a05a | 37 | CCOPT="%{rpmcflags} -fomit-frame-pointer" \ |
5e15440f ER |
38 | CC="%{__cc}" |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | install -d $RPM_BUILD_ROOT%{lualibdir} | |
43 | install -p bit.so $RPM_BUILD_ROOT%{lualibdir} | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %files | |
49 | %defattr(644,root,root,755) | |
50 | %doc README* doc/* | |
51 | %attr(755,root,root) %{lualibdir}/bit.so |