[lua-dbi] Initial import

trasher trasher at fedoraproject.org
Sat Jun 23 17:27:42 UTC 2012


commit 43294b9173e076202a540c04043fcbdba80efb8b
Author: Johan Cwiklinski <johan at x-tnd.be>
Date:   Sat Jun 23 19:29:29 2012 +0200

    Initial import

 .gitignore             |    1 +
 lua-dbi-RH-build.patch |   19 +++++++++++++
 lua-dbi.spec           |   71 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 4 files changed, 92 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..933970a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/luadbi.0.5.tar.gz
diff --git a/lua-dbi-RH-build.patch b/lua-dbi-RH-build.patch
new file mode 100644
index 0000000..62d0982
--- /dev/null
+++ b/lua-dbi-RH-build.patch
@@ -0,0 +1,19 @@
+diff -up lua-dbi-0.5/Makefile.RH-build lua-dbi-0.5/Makefile
+--- lua-dbi-0.5/Makefile.RH-build	2010-07-16 08:22:13.000000000 +0200
++++ lua-dbi-0.5/Makefile	2011-05-23 20:09:05.722206755 +0200
+@@ -1,12 +1,13 @@
+ CC=gcc
+-CFLAGS=-g -pedantic -Wall -O2 -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
++CFLAGS+=-g -pedantic -Wall -O2 -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/pgsql/server -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
+ AR=ar rcu
+ RANLIB=ranlib
+ RM=rm -rf
+ MKDIR=mkdir -p
+ 
++LIBDIR=/usr/lib
+ COMMON_LDFLAGS=
+-MYSQL_LDFLAGS=$(COMMON_LDFLAGS) -lmysqlclient
++MYSQL_LDFLAGS=$(COMMON_LDFLAGS) -L$(LIBDIR)/mysql -lmysqlclient
+ PSQL_LDFLAGS=$(COMMON_LDFLAGS) -lpq 
+ SQLITE3_LDFLAGS=$(COMMON_LDFLAGS) -lsqlite3 
+ DB2_LDFLAGS=$(COMMON_LDFLAGS) -L/opt/ibm/db2exc/V9.5/lib64 -L/opt/ibm/db2exc/V9.5/lib32 -ldb2 
diff --git a/lua-dbi.spec b/lua-dbi.spec
new file mode 100644
index 0000000..91e9dba
--- /dev/null
+++ b/lua-dbi.spec
@@ -0,0 +1,71 @@
+%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:        2%{?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
+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
+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
+* Sat Jun 23 2012 Matej Cepl <mcepl at redhat.com> - 0.5-2
+- Couple of fixes to satisfy packaging review.
+
+* Mon May 23 2011 Matěj Cepl <mcepl at redhat.com> - 0.5-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..28abcd3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ede2b003aadddc151aac87050c3d926e  luadbi.0.5.tar.gz


More information about the scm-commits mailing list