File luasocket.spec of Package luasocket

# spec file for package luasocket
# Copyright (c) 2014 SUSE LINUX Products 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 _version 3.0-rc1
Name:           luasocket
Version:        3.0~rc1
Release:        0
Summary:        Network support for the Lua language
License:        MIT
Group:          Development/Libraries
Source0:        luasocket-%{_version}.tar.gz
Patch0:         luasocket-makefile.patch
BuildRequires:  lua-devel
BuildRequires:  xz
Requires:       lua >= %{lua_version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

LuaSocket is a Lua extension library that is composed by two parts: a C core
that provides support for the TCP and UDP transport layers, and a set of Lua
modules that add support for functionality commonly needed by applications
that deal with the Internet.

Among the support modules, the most commonly used implement the SMTP, HTTP
and FTP. In addition there are modules for MIME, URL handling and LTN12.

%setup -q -n %{name}-%{_version}
%patch0 -p1

%{_bindir}/iconv -f ISO8859-1 -t UTF8 LICENSE >LICENSE.UTF8
make %{?_smp_mflags} OPTFLAGS="%{optflags} -fPIC" linux

make install-unix OPTFLAGS="%{optflags}" INSTALL_TOP=%{buildroot} INSTALL_TOP_CDIR=%{buildroot}%{lua_archdir} INSTALL_TOP_LDIR=%{buildroot}%{lua_noarchdir}

%doc doc/*

openSUSE Build Service is sponsored by