File lua51-bit32.spec of Package lua51-bit32

# spec file for package lua51-bit32
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define flavor lua51
%define flavor_dec $(c=%{flavor}; echo ${c:0:-1}.${c: -1})
%define mod_name bit32
Name:           %{flavor}-%{mod_name}
Version:        5.3.0
Release:        0
Summary:        Backport of Lua bit manipulation library introduced in 5.2
License:        MIT
Group:          Development/Languages/Other
BuildRequires:  %{flavor}-devel
BuildRequires:  libtool
Requires:       %{flavor}

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.

%setup -q -n lua-compat-5.2-bitlib-%{version}

gcc %{optflags} -I/usr/include -I./c-api \
    $(pkg-config --cflags --libs %{flavor_dec}) \
    lbitlib.c -shared -fPIC -o

install -d %{buildroot}%{lua_archdir}
install -p %{buildroot}%{lua_archdir}/

%license LICENSE