|
|
29ba0cf |
%if 0%{?fedora} >= 22
|
|
|
bbaa557 |
%define luaver 5.3
|
|
|
29ba0cf |
%else
|
|
|
29ba0cf |
%if 0%{?fedora} >= 20 || 0%{?rhel} > 7
|
|
|
29ba0cf |
%define luaver 5.2
|
|
|
29ba0cf |
%else
|
|
|
29ba0cf |
%define luaver 5.1
|
|
|
29ba0cf |
%endif
|
|
|
29ba0cf |
%endif
|
|
|
29ba0cf |
|
|
Johan Cwiklinski |
43294b9 |
%define lualibdir %{_libdir}/lua/%{luaver}
|
|
Johan Cwiklinski |
43294b9 |
%define luapkgdir %{_datadir}/lua/%{luaver}
|
|
|
e18b83a |
%define luacompatver 5.1
|
|
|
e18b83a |
%define luacompatlibdir %{_libdir}/lua/%{luacompatver}
|
|
|
e18b83a |
%define luacompatpkgdir %{_datadir}/lua/%{luacompatver}
|
|
|
e18b83a |
%define lua51dir %{_builddir}/lua51-%{name}-%{version}-%{release}
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%define real_name luadbi
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
Name: lua-dbi
|
|
Johan Cwiklinski |
43294b9 |
Version: 0.5
|
|
|
0d376dd |
Release: 19%{?dist}
|
|
Johan Cwiklinski |
43294b9 |
Summary: Database interface library for Lua
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
Group: Development/Libraries
|
|
Johan Cwiklinski |
43294b9 |
License: MIT
|
|
|
4018b41 |
URL: http://code.google.com/p/%{real_name}
|
|
Johan Cwiklinski |
43294b9 |
Source0: http://%{real_name}.googlecode.com/files/%{real_name}.%{version}.tar.gz
|
|
Johan Cwiklinski |
43294b9 |
Patch0: %{name}-RH-build.patch
|
|
|
e18b83a |
Patch1: %{name}-RH-build52.patch
|
|
|
bbaa557 |
Patch2: lua-dbi-0.5-sync-hg-47382fea7a9c.patch
|
|
|
4018b41 |
Patch3: lua-dbi-0.5-pgsql-include-flags.patch
|
|
Johan Cwiklinski |
43294b9 |
|
|
|
4018b41 |
BuildRequires: lua-devel, sqlite-devel, postgresql-devel
|
|
|
4018b41 |
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
|
|
|
4018b41 |
BuildRequires: mariadb-connector-c-devel
|
|
|
4018b41 |
%else
|
|
|
4018b41 |
BuildRequires: mysql-devel
|
|
|
4018b41 |
%endif
|
|
Johan Cwiklinski |
43294b9 |
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
|
|
|
4018b41 |
Requires: lua(abi) = %{luaver}
|
|
Johan Cwiklinski |
43294b9 |
%else
|
|
|
4018b41 |
Requires: lua >= %{luaver}
|
|
Johan Cwiklinski |
43294b9 |
%endif
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%description
|
|
Johan Cwiklinski |
43294b9 |
LuaDBI is a database interface library for Lua. It is designed to provide a
|
|
Johan Cwiklinski |
43294b9 |
RDBMS agnostic API for handling database operations. LuaDBI also provides
|
|
Johan Cwiklinski |
43294b9 |
support for prepared statement handles, placeholders and bind parameters for all
|
|
Johan Cwiklinski |
43294b9 |
database operations.
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
Currently LuaDBI supports DB2, Oracle, MySQL, PostgreSQL and SQLite databases
|
|
Johan Cwiklinski |
43294b9 |
with native database drivers.
|
|
Johan Cwiklinski |
43294b9 |
|
|
|
e18b83a |
%if 0%{?fedora} >= 20
|
|
|
e18b83a |
%package compat
|
|
|
e18b83a |
Summary: Database interface library for Lua 5.1
|
|
|
e18b83a |
Group: Development/Libraries
|
|
|
29ba0cf |
BuildRequires: compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
|
|
|
e18b83a |
|
|
|
e18b83a |
%description compat
|
|
|
e18b83a |
LuaDBI is a database interface library for Lua 5.1. It is designed to provide a
|
|
|
e18b83a |
RDBMS agnostic API for handling database operations. LuaDBI also provides
|
|
|
e18b83a |
support for prepared statement handles, placeholders and bind parameters for all
|
|
|
e18b83a |
database operations.
|
|
|
e18b83a |
|
|
|
e18b83a |
Currently LuaDBI supports DB2, Oracle, MySQL, PostgreSQL and SQLite databases
|
|
|
e18b83a |
with native database drivers.
|
|
|
e18b83a |
%endif
|
|
|
e18b83a |
|
|
Johan Cwiklinski |
43294b9 |
%prep
|
|
Johan Cwiklinski |
43294b9 |
%setup -q -c
|
|
|
bbaa557 |
|
|
|
bbaa557 |
%patch2 -p1 -b .47382fea7a9c
|
|
Johan Cwiklinski |
43294b9 |
find . -name \*.[ch] -print -exec chmod -x '{}' \;
|
|
Johan Cwiklinski |
43294b9 |
|
|
|
e18b83a |
%if 0%{?fedora} >= 20
|
|
|
e18b83a |
rm -rf %{lua51dir}
|
|
|
e18b83a |
cp -a . %{lua51dir}
|
|
|
e18b83a |
pushd %{lua51dir}
|
|
|
e18b83a |
%patch0 -p1 -b .RH-build
|
|
|
e18b83a |
popd
|
|
|
e18b83a |
%endif
|
|
|
e18b83a |
|
|
|
e18b83a |
%patch1 -p1 -b .RH-build52
|
|
|
bbaa557 |
%patch3 -p1 -b .pgsqlflags
|
|
|
e18b83a |
|
|
Johan Cwiklinski |
43294b9 |
%build
|
|
|
39fc752 |
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DLUA_COMPAT_APIINTCASTS"
|
|
Johan Cwiklinski |
43294b9 |
make %{?_smp_mflags} LIBDIR="%{_libdir}"
|
|
Johan Cwiklinski |
43294b9 |
|
|
|
e18b83a |
%if 0%{?fedora} >= 20
|
|
|
e18b83a |
pushd %{lua51dir}
|
|
|
39fc752 |
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DLUA_COMPAT_APIINTCASTS"
|
|
|
e18b83a |
make %{?_smp_mflags} LIBDIR="%{_libdir}"
|
|
|
e18b83a |
popd
|
|
|
e18b83a |
%endif
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%install
|
|
Johan Cwiklinski |
43294b9 |
rm -rf $RPM_BUILD_ROOT
|
|
Johan Cwiklinski |
43294b9 |
mkdir -p $RPM_BUILD_ROOT%{luapkgdir}
|
|
Johan Cwiklinski |
43294b9 |
mkdir -p $RPM_BUILD_ROOT%{lualibdir}
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
cp -p *.so $RPM_BUILD_ROOT%{lualibdir}
|
|
Johan Cwiklinski |
43294b9 |
cp -p *.lua $RPM_BUILD_ROOT%{luapkgdir}
|
|
|
39fc752 |
|
|
|
e18b83a |
%if 0%{?fedora} >= 20
|
|
|
e18b83a |
pushd %{lua51dir}
|
|
|
e18b83a |
mkdir -p $RPM_BUILD_ROOT%{luacompatpkgdir}
|
|
|
e18b83a |
mkdir -p $RPM_BUILD_ROOT%{luacompatlibdir}
|
|
|
e18b83a |
|
|
|
e18b83a |
cp -p *.so $RPM_BUILD_ROOT%{luacompatlibdir}
|
|
|
e18b83a |
cp -p *.lua $RPM_BUILD_ROOT%{luacompatpkgdir}
|
|
|
e18b83a |
popd
|
|
|
e18b83a |
%endif
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%clean
|
|
Johan Cwiklinski |
43294b9 |
rm -rf $RPM_BUILD_ROOT
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%files
|
|
|
4018b41 |
%{!?_licensedir:%global license %%doc}
|
|
|
4018b41 |
%license COPYING
|
|
|
4018b41 |
%doc README
|
|
Johan Cwiklinski |
43294b9 |
%{lualibdir}/*.so
|
|
Johan Cwiklinski |
43294b9 |
%{luapkgdir}/*.lua
|
|
Johan Cwiklinski |
43294b9 |
|
|
|
e18b83a |
%if 0%{?fedora} >= 20
|
|
|
e18b83a |
%files compat
|
|
|
4018b41 |
%{!?_licensedir:%global license %%doc}
|
|
|
4018b41 |
%license COPYING
|
|
|
4018b41 |
%doc README
|
|
|
e18b83a |
%{luacompatlibdir}/*.so
|
|
|
e18b83a |
%{luacompatpkgdir}/*.lua
|
|
|
e18b83a |
%endif
|
|
|
e18b83a |
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
%changelog
|
|
|
0d376dd |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-19
|
|
|
0d376dd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
0d376dd |
|
|
|
4018b41 |
* Thu Sep 21 2017 Robert Scheck <robert@fedoraproject.org> 0.5-18
|
|
|
4018b41 |
- Build against mariadb-connector-c-devel rather mysql-devel for
|
|
|
4018b41 |
Fedora >= 28 (#1493634, thanks to Michal Schorm)
|
|
|
4018b41 |
|
|
|
356b43d |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-17
|
|
|
356b43d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
356b43d |
|
|
|
6eed5bc |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-16
|
|
|
6eed5bc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
6eed5bc |
|
|
|
7ab4ef5 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-15
|
|
|
7ab4ef5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
7ab4ef5 |
|
|
|
44568bc |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-14
|
|
|
44568bc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
44568bc |
|
|
|
39fc752 |
* Sun Jun 21 2015 Robert Scheck <robert@fedoraproject.org> 0.5-13
|
|
|
39fc752 |
- Really build -compat subpackage against compat-lua (#1232688)
|
|
|
39fc752 |
|
|
|
9c282bd |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-12
|
|
|
9c282bd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
9c282bd |
|
|
|
bbaa557 |
* Thu Jan 15 2015 Tom Callaway <spot@fedoraproject.org> - 0.5-11
|
|
|
bbaa557 |
- add all new upstream fixes
|
|
|
bbaa557 |
- rebuild for lua 5.3
|
|
|
bbaa557 |
- fix compile against modern pgsql
|
|
|
bbaa557 |
|
|
|
9bc10f8 |
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-10
|
|
|
9bc10f8 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
9bc10f8 |
|
|
|
2f0932c |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-9
|
|
|
2f0932c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
2f0932c |
|
|
|
e18b83a |
* Thu May 22 2014 Jan Kaluza <jkaluza@redhat.com> - 0.5-8
|
|
|
e18b83a |
- build -compat subpackage against compat-lua
|
|
|
e18b83a |
|
|
|
8ea17d7 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-7
|
|
|
8ea17d7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
8ea17d7 |
|
|
|
5b6b728 |
* Fri May 10 2013 Tom Callaway <spot@fedoraproject.org> - 0.5-6
|
|
|
5b6b728 |
- rebuild for lua 5.2
|
|
|
5b6b728 |
|
|
|
3728e5d |
* Fri Apr 26 2013 Robert Scheck <robert@fedoraproject.org> - 0.5-5
|
|
|
3728e5d |
- Added upstream patch to avoid PostgreSQL transaction warnings
|
|
|
3728e5d |
|
|
|
eacf9e7 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
|
|
|
eacf9e7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
eacf9e7 |
|
|
|
0c328c6 |
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
|
|
|
0c328c6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
0c328c6 |
|
|
Johan Cwiklinski |
43294b9 |
* Sat Jun 23 2012 Matej Cepl <mcepl@redhat.com> - 0.5-2
|
|
Johan Cwiklinski |
43294b9 |
- Couple of fixes to satisfy packaging review.
|
|
Johan Cwiklinski |
43294b9 |
|
|
Johan Cwiklinski |
43294b9 |
* Mon May 23 2011 Matěj Cepl <mcepl@redhat.com> - 0.5-1
|
|
Johan Cwiklinski |
43294b9 |
- Initial packaging
|