2024-10-03 17:25:05 +00:00
|
|
|
#
|
|
|
|
# spec file for package lua-luadbi
|
|
|
|
#
|
|
|
|
# Copyright (c) 2024 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define flavor @BUILD_FLAVOR@
|
|
|
|
%define mod_name luadbi
|
|
|
|
Version: 0.7.3
|
|
|
|
Release: 0
|
|
|
|
Summary: A database interface library for Lua
|
|
|
|
License: MIT
|
|
|
|
Group: Productivity/Databases/Tools
|
|
|
|
URL: https://github.com/mwild1/luadbi
|
2024-10-03 17:27:36 +00:00
|
|
|
Source0: https://github.com/mwild1/%{mod_name}/archive/refs/tags/v%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz
|
2024-10-03 17:25:05 +00:00
|
|
|
# Formely found on code.google.com
|
2024-10-03 17:27:36 +00:00
|
|
|
Source1: luadbi-%{version}.tar.gz
|
2024-10-03 17:25:05 +00:00
|
|
|
Source50: tests-modules-load.lua
|
|
|
|
# PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix postgresql headers' path
|
|
|
|
Patch0: luadbi-postgresql-headers.patch
|
|
|
|
BuildRequires: %{flavor}-devel
|
|
|
|
BuildRequires: libmysqld-devel
|
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
BuildRequires: postgresql-server-devel
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
Requires: %{flavor}
|
|
|
|
# %%lua_provides
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
Name: lua-%{mod_name}
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%else
|
|
|
|
Name: %{flavor}-%{mod_name}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
LuaDBI is a database interface library for Lua. It is designed to provide a
|
|
|
|
RDBMS agnostic API for handling database operations. LuaDBI also provides
|
|
|
|
support for prepared statement handles, placeholders and bind parameters for
|
|
|
|
all database operations.
|
|
|
|
|
|
|
|
Currently LuaDBI supports DB2, Oracle, MySQL, PostgreSQL and SQLite databases
|
|
|
|
with native database drivers. But openSUSE version doesn't build with DB2 and
|
|
|
|
Oracle.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n luadbi-%{version}
|
|
|
|
|
|
|
|
sed -i \
|
|
|
|
-e 's:-g -pedantic -Wall -O2:%{optflags} -fPIC -I%{lua_incdir}:g' \
|
|
|
|
Makefile
|
|
|
|
|
|
|
|
%build
|
|
|
|
%make_build LIBDIR=%{_libdir}
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -d %{buildroot}%{lua_archdir}
|
|
|
|
install -d %{buildroot}%{lua_noarchdir}
|
|
|
|
make install_free DESTDIR=%{buildroot} LUA_LDIR=%{lua_noarchdir} LUA_CDIR=%{lua_archdir}
|
|
|
|
|
|
|
|
%check
|
|
|
|
# run tests
|
2024-10-03 17:27:36 +00:00
|
|
|
lua%{lua_version} %{SOURCE50} %{buildroot}
|
2024-10-03 17:25:05 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license COPYING
|
|
|
|
%doc README.md
|
|
|
|
%dir %{lua_archdir}/dbd
|
|
|
|
%{lua_archdir}/dbd/*.so
|
|
|
|
%{lua_noarchdir}/*.lua
|
|
|
|
|
|
|
|
%changelog
|