File perl-Lua-API.spec of Package perl-Lua-API

# Specfile autogenerated by cpanspec 1.78.

%if "%{_vendor}" == "debbuild"
%global binpkgname liblua-api-perl
%else
%global binpkgname %{name}
%endif

Name:           perl-Lua-API
Version:        0.04
Release:        0%{?dist}
Summary:        Interface to Lua's embedding API
%if "%{_vendor}" == "debbuild"
Packager:       debbuild developers <https://github.com/debbuild/debbuild>
License:        GPL-3.0+
%else
Group:          Development/Libraries%{?suse_version:/Perl}
License:        GPLv3+
%endif
URL:            http://search.cpan.org/dist/Lua-API/
Source0:        http://www.cpan.org/authors/id/D/DJ/DJERIUS/Lua-API-%{version}.tar.gz

%if "%{_vendor}" == "debbuild"
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  perl >= 5.8.0
BuildRequires:  perl-deb-macros
BuildRequires:  libtest-class-perl
BuildRequires:  libtest-compile-perl
BuildRequires:  libtest-most-perl
BuildRequires:  pkg-config
BuildRequires:  liblua5.1-0-dev
%else
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  perl >= 1:5.8.0
BuildRequires:  perl-generators
BuildRequires:  perl(Devel::PPPort) >= 3.19
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(ExtUtils::ParseXS) >= 2.21
BuildRequires:  perl(Test::Class)
BuildRequires:  perl(Test::Compile)
BuildRequires:  perl(Test::Most)
BuildRequires:  perl(XSLoader) >= 0.1
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(lua-5.1)

Requires:       perl(XSLoader) >= 0.1
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%endif

%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.

%if "%{_vendor}" == "debbuild"
%package -n %{binpkgname}
Summary:        Interface to Lua's embedding API
Group:          perl
Requires:       perl-base >= 5.8.0

%description -n %{binpkgname}
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.
%endif

%prep
%autosetup -n Lua-API-%{version}

%build
%if "%{_vendor}" == "debbuild"
export LUA_INC=$(pkg-config --cflags lua5.1)
export LUA_LIBS=$(pkg-config --libs lua5.1)
%else
export LUA_INC=$(pkg-config --cflags lua-5.1)
export LUA_LIBS=$(pkg-config --libs lua-5.1)
%endif
PERL_USE_UNSAFE_INC=1 %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%make_build

%install
make pure_install PERL_INSTALL_ROOT=%{buildroot}

find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

%check
make test

%files -n %{binpkgname}
%doc ChangeLog Changes const-c.inc const-xs.inc Makefile.PL.orig proto_hints.yml protos protos.yml README wrap_xs.tpl xs_xs.tpl
%license LICENSE
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Lua*
%{_mandir}/man3/*

%changelog
openSUSE Build Service is sponsored by