blob: bf1435d27862c5905fcfa87ab04a76fccb7a1cc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
%global lua_minver 5.1
%{!?lua_version: %global lua_version %([[ -x /usr/bin/lua ]] && lua -e "print(string.sub(_VERSION, 5))" || echo %{lua_minver})}
%global lua_libdir %{_libdir}/lua/%{lua_version}
BuildRequires: libtool
BuildRequires: lua >= 5.1
BuildRequires: lua-devel >= 5.1
Name: lua-bit32
Version: 5.3.0
Release: 1%{?dist}
License: MIT
Summary: Backport of Lua bit manipulation library introduced in 5.2
Url: https://luarocks.org/modules/siffiejoe/bit32
Requires: lua(abi) = %{lua_version}
Source0: https://github.com/keplerproject/lua-compat-5.2/archive/bitlib-%{version}.tar.gz
%description
bit32 is the native Lua 5.2 bit manipulation library, in the version
from Lua 5.3; it is compatible with Lua 5.1, 5.2 and 5.3.
%prep
%autosetup -n lua-compat-5.2-bitlib-%{version}
%build
gcc %{optflags} -I/usr/include -I./c-api $(pkg-config --libs lua) lbitlib.c -shared -fPIC -o bit32.so
%install
install -d %{buildroot}%{lua_libdir}
install -p bit32.so %{buildroot}%{lua_libdir}/
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md
%{lua_libdir}/bit32.so
%changelog
* Mon May 08 2017 Michel Alexandre Salim <salimma@fedoraproject.org> - 5.3.0-1
- Initial package
|