]> git.pld-linux.org Git - packages/sqlite3.git/commitdiff
support icu enabling
authorElan Ruusamäe <glen@delfi.ee>
Sun, 5 May 2013 09:48:37 +0000 (12:48 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 5 May 2013 09:48:37 +0000 (12:48 +0300)
sqlite3.spec

index 5f2e33627f24ccf0ff9ce7f7071e4588cc2d3196..3fbfba43c9af45c9b7398ac30d09c4e56b8510a5 100644 (file)
@@ -8,6 +8,7 @@
 %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
@@ -38,6 +39,7 @@ Patch0:               %{name}-sign-function.patch
 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
@@ -84,6 +86,9 @@ Provides:     %{name}-devel(unlock_notify)
 %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
@@ -179,18 +184,22 @@ Rozszerzenie sqlite3 dla Tcl.
 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
 
@@ -205,7 +214,6 @@ export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
-
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
@@ -214,7 +222,7 @@ mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
 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
This page took 0.137484 seconds and 4 git commands to generate.