Files
perl-Lua-API/perl-Lua-API.spec

85 lines
3.0 KiB
RPMSpec

#
# spec file for package perl-Lua-API
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: perl-Lua-API
Version: 0.04
Release: 0
%define cpan_name Lua-API
Summary: Interface to Lua's embedding API
License: GPL-3.0-or-later
Group: Development/Libraries/Perl
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/D/DJ/DJERIUS/%{cpan_name}-%{version}.tar.gz
%if "%_vendor" != "debbuild"
ExclusiveArch: do_not_build
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: lua51-devel
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Devel::PPPort) >= 3.19
BuildRequires: perl(ExtUtils::ParseXS) >= 2.21
BuildRequires: perl(ExtUtils::PkgConfig)
BuildRequires: perl(Test::Class)
BuildRequires: perl(Test::Compile)
BuildRequires: perl(Test::Most)
BuildRequires: perl(XSLoader) >= 0.1
Requires: perl(XSLoader) >= 0.1
%{perl_requires}
%description
*Lua* is a simple, expressive, extension programming language that is
easily embeddable. *Lua::API* provides Perl bindings to Lua's C-based
embedding API. It allows Perl routines to be called from Lua as if they
were written in C, and allows Perl routines to directly manipulate the Lua
interpreter and its environment. It presents a very low-level interface
(essentially equivalent to the C interface), so is aimed at developers who
need that sort of access.
*Lua::API* is not the first place to turn to if you need a simple, more
Perl-ish interface; for that, try *Inline::Lua*, which takes a much higher
level approach and masks most of the underlying complexity in communicating
between Lua and Perl. Unfortunately by hiding the complexity, this approach
also prevents full operability. For *Inline::Lua* this is a necessary
tradeoff, but it does mean that you cannot create as tight an integration
with Lua.
%prep
%setup -q -n %{cpan_name}-%{version}
rm Makefile.PL.orig
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc ChangeLog Changes const-c.inc const-xs.inc examples proto_hints.yml protos protos.yml README wrap_xs.tpl xs_xs.tpl
%license LICENSE
%changelog