# - enable --enable-load-extension?
#
# Conditional build:
-%bcond_with tests # run tests
-%bcond_with tcl # enable tcl extension
-%bcond_without doc # disable documentation building
+%bcond_with tests # run tests
+%bcond_with tcl # enable tcl extension
+%bcond_without doc # disable documentation building
+%bcond_without unlock_notify # disable unlock notify API
+%bcond_with load_extension # enable load extension API
%ifarch alpha sparc %{x8664}
%undefine with_tests
%undefine with_tests
%endif
+%define realver 3070500
+%define srcver src
+%define rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g")
%define _ulibdir /usr/lib
%define tclver 8.5
Summary: SQLite library
Summary(pl.UTF-8): Biblioteka SQLite
Name: sqlite3
-Version: 3.7.2
-Release: 1
+Version: 3.7.5
+Release: 2
License: LGPL
Group: Libraries
# Source0Download: http://www.sqlite.org/download.html
-Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
-# Source0-md5: 5f1853c4c1eba3330b6104f274918673
+Source0: http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip
+# Source0-md5: d61d784997d42cd0d92bac7994094c56
Patch0: %{name}-sign-function.patch
URL: http://www.sqlite.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: readline-devel
+%{?with_load_extension:BuildRequires: sed >= 4.0}
BuildRequires: tcl
%{?with_tcl:BuildRequires: tcl-devel}
+BuildRequires: unzip
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Rozszerzenie sqlite3 dla Tcl.
%prep
-%setup -q -n sqlite-%{version}
+%setup -q -n sqlite-%{srcver}-%{realver}
%patch0 -p1
%{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
cp -f /usr/share/automake/config.sub .
%{__aclocal}
%{__autoconf}
-CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1"
+CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE %{?with_unlock_notify:-DSQLITE_ENABLE_UNLOCK_NOTIFY}"
export CFLAGS
+%if %{with load_extension}
+LIBS=-ldl
+export LIBS
+%endif
%configure \
%{?with_tcl:--with-tcl=%{_ulibdir}} \
%{!?with_tcl:--disable-tcl} \
--enable-threadsafe
+%{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
%{__make}
%if %{with doc}