Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > a948c18372ef69b486c3754438644794 > files > 3

lua-dbi-0.5-5.fc18.src.rpm

%define luaver 5.1
%define lualibdir %{_libdir}/lua/%{luaver}
%define luapkgdir %{_datadir}/lua/%{luaver}

%define real_name luadbi

Name:           lua-dbi
Version:        0.5
Release:        5%{?dist}
Summary:        Database interface library for Lua

Group:          Development/Libraries
License:        MIT
URL:             http://code.google.com/p/%{real_name}
Source0:        http://%{real_name}.googlecode.com/files/%{real_name}.%{version}.tar.gz
Patch0:         %{name}-RH-build.patch
Patch1:         %{name}-0.5-pgsql_transaction.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  lua-devel, mysql-devel, sqlite-devel, postgresql-devel
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
Requires: lua(abi) = %{luaver}
%else
Requires: lua >= %{luaver}
%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.

%prep
%setup -q -c
%patch0 -p1 -b .RH-build
%patch1 -p1 -b .pgsql_transaction
find . -name \*.[ch] -print -exec chmod -x '{}' \;

%build
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
make %{?_smp_mflags} LIBDIR="%{_libdir}"


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{luapkgdir}
mkdir -p $RPM_BUILD_ROOT%{lualibdir}

cp -p *.so $RPM_BUILD_ROOT%{lualibdir}
cp -p *.lua $RPM_BUILD_ROOT%{luapkgdir}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README COPYING
%{lualibdir}/*.so
%{luapkgdir}/*.lua


%changelog
* Fri Apr 26 2013 Robert Scheck <robert@fedoraproject.org> - 0.5-5
- Added upstream patch to avoid PostgreSQL transaction warnings

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jun 23 2012 Matej Cepl <mcepl@redhat.com> - 0.5-2
- Couple of fixes to satisfy packaging review.

* Mon May 23 2011 Matěj Cepl <mcepl@redhat.com> - 0.5-1
- Initial packaging