%bcond_without doc # disable documentation building
%bcond_without unlock_notify # disable unlock notify API
%bcond_without load_extension # enable load extension API
+%bcond_with icu # ICU tokenizer support
%ifarch alpha sparc %{x8664}
%undefine with_tests
URL: http://www.sqlite.org/
%{?with_load_extension:Provides: %{name}(load_extension)}
%{?with_unlock_notify:Provides: %{name}(unlock_notify)}
+%{?with_icu:Provides: %{name}(icu)}
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: libtool
%if %{with load_extension}
Provides: %{name}-devel(load_extension)
%endif
+%if %{with icu}
+Provides: %{name}-devel(icu)
+%endif
%description devel
SQLite is a C library that implements an SQL database engine. A large
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 -DSQLITE_SECURE_DELETE %{?with_unlock_notify:-DSQLITE_ENABLE_UNLOCK_NOTIFY}"
-export CFLAGS
-%if %{with load_extension}
-LIBS=-ldl
-export LIBS
-%endif
+export 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}
+ %{?with_icu:-DSQLITE_ENABLE_ICU}
+"
+export LIBS="%{?with_load_extension:-ldl} %{?with_icu:-licui18n -licuuc}"
%if %{with tcl}
export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
%endif
+
%configure \
- %{?with_tcl:--with-tcl=%{_ulibdir}} \
- %{!?with_tcl:--disable-tcl} \
+ %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
%{__enable_disable load_extension load-extension} \
--enable-threadsafe
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
-
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
$RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
-cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
rm -rf $RPM_BUILD_ROOT