File lua-luaposix.spec of Package lua-luaposix

# spec file for package lua-luaposix
# 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 pack_version 33.4.0

Name:           lua-luaposix
Version:        %{pack_version}
Release:        0
Summary:        POSIX library for Lua
Group:          Development/Libraries/Other
License:        MIT

BuildRequires:  lua-devel >= %{lua_version}
Requires:       lua >= %{lua_version}
BuildRequires:  ncurses-devel
BuildRequires:  automake
BuildRequires:  autoconf
Recommends:	lua-luaposix-doc = %pack_version
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Patch1:		install_path.patch

This is a POSIX library for Lua which provides access to many POSIX features
to Lua programs.

%package doc
Summary:	Documentation on luaposix
Group:		Documentation/HTML
Version:	%{pack_version}
Release:	0
# Work around SLE-11 rpm not supporting noarch sub packages.
%if 0%{?suse_version} >= 1310
BuildArch:	noarch

%description doc
This package contains the documentation for lua-luaposix.

%setup -n luaposix-release-v%{version}

%configure --libdir=%{lua_archdir} --datadir=%{lua_noarchdir} --docdir=%{_docdir}
make %{?_smp_mflags}

rm -f %{buildroot}%{lua_archdir}/*.la

%if 0%{?suse_version} >= 1310
make check

%doc README ChangeLog NEWS
%dir %{_docdir}/examples
%dir %{_docdir}/modules
%dir %{_docdir}/classes
%dir %{lua_noarchdir}/posix

%files doc
%doc %{_docdir}/classes/posix.curses.*.html
%doc %{_docdir}/examples/*.lua.html
%doc %{_docdir}/modules/posix.*.html
%doc %{_docdir}/modules/posix.html
%doc %{_docdir}/index.html
%doc %{_docdir}/ldoc.css