File lua-luafilesystem.spec of Package lua-luafilesystem
#
# spec file for package lua-luafilesystem (Version 1.4.2)
#
# Copyright 2009 Mario García H.
#
# 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.
%define lua_version 5.1
%define lforge_name luafilesystem
%define lua_libdir %(eval [ -d %{_libdir}/lua ] && echo 0 || echo 1)
%define lua_libdir5 %(eval [ -d %{_libdir}/lua/%{lua_version} ] && echo 0 || echo 1)
Summary: Set of functions related to File systems for Lua
Name: lua-%{lforge_name}
Version: 1.4.2
Release: 1
Source0: %{lforge_name}-%{version}.tar.gz
Source1: http://luaforge.net/frs/download.php/3931/%{lforge_name}-%{version}.tar.gz
Patch0: %{lforge_name}-%{version}-paths.patch
Patch1: %{lforge_name}-%{version}-path64.patch
Vendor: %{vendor}
URL: http://luaforge.net/projects/%{name}/
License: MIT
Requires: lua >= %{lua_version}
BuildRequires: lua-devel >= %{lua_version}
Group: Development/Languages/Lua
BuildRoot: %{_builddir}/%{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.
LuaFileSystem is free software and uses the
same license as Lua 5.1
%prep
%setup -q -n %{lforge_name}-%{version}
%ifarch x86_64
%patch1 -p1
%else
%patch0 -p1
%endif
%build
%{__make}
%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install
find %{buildroot} -name "*.so" -exec strip {} \;
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%if %{?lua_libdir:1}0
%dir %{_libdir}/lua
%endif
%if %{?lua_libdir5:1}0
%dir %{_libdir}/lua/%{lua_version}
%endif
%{_libdir}/lua/%{lua_version}/lfs.so
%changelog
* Fri Jul 31 2009 Mario García H. <code933k@gmail.com> - 1.4.2
- Initial package.