File lua-luafilesystem.spec of Package lua-luafilesystem

#
# spec file for package lua-luafilesystem
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#
%define trans() ( echo %{1} | sed -e "s#_#\\.#g" )
%define vers_f() %(%trans)

%define mod_version 1_6_3
%define mod_name luafilesystem

Name:           lua-luafilesystem
Version:        %{vers_f %mod_version}
Release:        0
License:        MIT
Summary:        Filesystem support for Lua
Url:            http://keplerproject.github.com/luafilesystem
Group:          Development/Libraries/Other
Source:         https://github.com/keplerproject/luafilesystem/archive/v_%{mod_version}.tar.gz
BuildRequires:  lua-devel >= %{lua_version}
Requires:	lua  >= %{lua_version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
LuaFileSystem is a Lua library developed to complement the set of functions
related to file systems offered by the standard Lua distribution.

LuaFileSystem offers a portable way to access the underlying directory
structure and file attributes.

%prep
%setup -q -n %{mod_name}-v_%{mod_version}

%build
export OPTFLAGS="%{optflags} -fPIC"
make %{_smp_mflags}

%install
%make_install LUA_LIBDIR='$(DESTDIR)/%{lua_archdir}/'

%files
%defattr(-,root,root,-)
%doc doc/us/*
%dir %{lua_archdir}
%{lua_archdir}/lfs.so

%changelog
openSUSE Build Service is sponsored by