commit 2100e936830ecebfbc7ae35991dfbbaaf990b5107e424435a47a93f92dc3a37f Author: Tomáš Chvátal Date: Thu Jul 13 19:00:57 2017 +0000 osc copypac from project:devel:languages:lua package:lua51-luadbi revision:1, using expand OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-luadbi?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/lua51-luadbi.changes b/lua51-luadbi.changes new file mode 100644 index 0000000..8fc4419 --- /dev/null +++ b/lua51-luadbi.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Sat Jun 29 00:33:08 UTC 2013 - i@marguerite.su + +- initial version 0.5 +- add new patch: luadbi-postgresql-headers.patch + diff --git a/lua51-luadbi.spec b/lua51-luadbi.spec new file mode 100644 index 0000000..a3993bc --- /dev/null +++ b/lua51-luadbi.spec @@ -0,0 +1,83 @@ +# +# spec file for package lua51-luadbi +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +Name: lua51-luadbi +Version: 0.5 +Release: 0 +License: MIT +Summary: A database interface library for Lua +Url: https://code.google.com/p/luadbi +Group: Productivity/Databases/Tools +Source: https://luadbi.googlecode.com/files/luadbi.%{version}.tar.gz +# PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix postgresql headers' path +Patch: luadbi-postgresql-headers.patch +%if 0%{?suse_version} >= 1220 +BuildRequires: lua51-devel +%else +BuildRequires: lua-devel +%endif +BuildRequires: sqlite3-devel +BuildRequires: postgresql-devel +%if 0%{?sles_version} +BuildRequires: libmysqlclient-devel +%else +BuildRequires: libmysqld-devel +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%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 +%setup -q -n luadbi-%{version} +%patch -p1 + +%build +export CFLAGS="%{optflags} -fPIC" +make %{?_smp_mflags} LIBDIR=%{_libdir} + +%install +install -d %{buildroot}%{_libdir}/lua/5.1 +install -d %{buildroot}%{_datadir}/lua/5.1 + +cp -r *.so %{buildroot}%{_libdir}/lua/5.1 +cp -r *.lua %{buildroot}%{_datadir}/lua/5.1 + +# fix shebang +sed -i "s/\/usr\/bin\/lua/\/usr\/bin\/env lua/" %{buildroot}%{_datadir}/lua/5.1/DBI.lua + +%files +%defattr(-,root,root) +%doc README COPYING +%{_libdir}/lua/5.1/*.so +%{_datadir}/lua/5.1/*.lua +%if 0%{?sles_version} +%dir %{_libdir}/lua +%dir %{_libdir}/lua/5.1 +%dir %{_datadir}/lua +%dir %{_datadir}/lua/5.1 +%endif + +%changelog + diff --git a/luadbi-postgresql-headers.patch b/luadbi-postgresql-headers.patch new file mode 100644 index 0000000..5ac52e9 --- /dev/null +++ b/luadbi-postgresql-headers.patch @@ -0,0 +1,12 @@ +Index: luadbi/dbd/postgresql/dbd_postgresql.h +=================================================================== +--- luadbi.orig/dbd/postgresql/dbd_postgresql.h ++++ luadbi/dbd/postgresql/dbd_postgresql.h +@@ -1,5 +1,5 @@ +-#include +-#include ++#include ++#include + #include + + /* diff --git a/luadbi.0.5.tar.gz b/luadbi.0.5.tar.gz new file mode 100644 index 0000000..1c2cb66 --- /dev/null +++ b/luadbi.0.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8776ec7a4bae2e5a81557b46b8c36894ac1e8a1f39fc8f063f91919b4e52c3d3 +size 24842