SHA256
10
0
forked from pool/lua-luaposix
Files
lua-luaposix/lua-luaposix.spec

94 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package lua-luaposix
#
# Copyright (c) 2017 SUSE LINUX 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 flavor @BUILD_FLAVOR@
%define mod_name luaposix
Version: 33.3.1
Release: 0
Summary: POSIX library for Lua
License: MIT
Group: Development/Libraries/Other
Url: https://github.com/luaposix/luaposix
Source0: https://github.com/luaposix/luaposix/archive/release-v%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz
BuildRequires: %{flavor}-devel
BuildRequires: ncurses-devel
BuildRequires: perl
Requires: %{flavor}
%if "%{flavor}" == "lua53"
Provides: lua-%{_name} = %{version}
Obsoletes: lua-%{_name} < %{version}
%endif
%if "%{flavor}" == ""
Name: lua-%{mod_name}
ExclusiveArch: do_not_build
%else
Name: %{flavor}-%{mod_name}
%endif
%description
This is a POSIX library for Lua which provides access to many POSIX features
to Lua programs.
%package -n %{mod_name}-doc
Summary: Documentation on luaposix
Group: Documentation/HTML
BuildArch: noarch
%description -n %{mod_name}-doc
This package contains the documentation for %{_flavor}-luaposix.
%prep
%setup -q -n luaposix-release-v%{version}
%build
%configure \
--disable-silent-rules \
--libexecdir=%{lua_archdir} \
--libdir=%{lua_archdir} \
--datadir=%{lua_noarchdir} \
--docdir=%{_docdir}/%{mod_name}
make %{?_smp_mflags}
%install
%make_install
rm -f %{buildroot}%{lua_archdir}/*.la
%check
make %{?_smp_mflags} check
%files
%doc README ChangeLog NEWS
%dir %{lua_noarchdir}/posix
%{lua_archdir}/*.so
%{lua_noarchdir}/*.lua
%{lua_noarchdir}/posix/*.lua
%files -n %{mod_name}-doc
%dir %{_docdir}/%{mod_name}
%dir %{_docdir}/%{mod_name}/examples
%dir %{_docdir}/%{mod_name}/modules
%dir %{_docdir}/%{mod_name}/classes
%doc %{_docdir}/%{mod_name}/classes/posix.curses.*.html
%doc %{_docdir}/%{mod_name}/examples/*.lua.html
%doc %{_docdir}/%{mod_name}/modules/posix.*.html
%doc %{_docdir}/%{mod_name}/modules/posix.html
%doc %{_docdir}/%{mod_name}/index.html
%doc %{_docdir}/%{mod_name}/ldoc.css
%changelog