File lua51-BitOp.spec of Package lua51-BitOp

#
# spec file for package lua-BitOp
#
# Copyright (c) 2015 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 http://bugs.opensuse.org/
#


%define mod_name    BitOp
%define lua_version %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2)
%define lua_archdir %{_libdir}/lua/%{lua_version}
Name:           lua51-%{mod_name}
Version:        1.0.2
Release:        0
Summary:        Lua Bit Operations Module
License:        MIT
Group:          Development/Libraries/Other
Url:            http://bitop.luajit.org/index.html
Source:         http://bitop.luajit.org/download/LuaBitOp-%{version}.tar.gz
BuildRequires:  gcc
BuildRequires:  lua51-devel
Requires:       lua51

%description
Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations
on numbers.

%package doc
Summary:        Lua Documentation for %{mod_name}
Group:          Development/Languages/Other
Requires:       %{name} = %{version}

%description doc
Documentation and examples included with the library, sometimes
generated by luadoc or ldoc.

%prep
%setup -q -n LuaBitOp-%{version}

%build
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_docdir}/%{name}
mkdir -p %{buildroot}%{lua_archdir}
install bit.so %{buildroot}%{lua_archdir}

%files
%defattr(-,root,root,-)
%dir %{lua_archdir}
%{lua_archdir}/*

%files doc
%defattr(-,root,root,-)
%doc README

%changelog
openSUSE Build Service is sponsored by