File lua51-luafilesystem.spec of Package lua51-luafilesystem

# spec file for package lua51-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
%define mod_name luafilesystem

Name:           lua51-luafilesystem
Version:        1.6.2
Release:        0
License:        MIT
Summary:        Filesystem support for Lua
Group:          Development/Libraries/Other
Source:         luafilesystem-%{version}.tar.gz
# PATCH-FIX-OPENSUSE  lua51-luafilesystem-fix-configuration.patch -- Clean up building and add rpm optflags.
Patch0:         lua51-luafilesystem-fix-configuration.patch
%if 0%{?suse_version} >= 1140
BuildRequires:  lua51-devel
BuildRequires:  lua-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

%setup -q -n %{mod_name}-%{version}
%patch0 -p1

sed -i 's|@@VERSION@@|%{version}|g' Makefile

export OPTFLAGS="%{optflags}"

%makeinstall LUA_LIBDIR='$(DESTDIR)%{_libdir}/lua/5.1/'

%doc doc/us/*
%dir %{_libdir}/lua
%dir %{_libdir}/lua/5.1