2 # - some tests fail with tcl8.5, it's tcl fault,
3 # if someone REALLY cares (s)he can look into it
6 %bcond_with tests # run tests
7 %bcond_without tcl # Tcl extension
8 %bcond_without doc # disable documentation building
9 %bcond_without unlock_notify # disable unlock notify API
10 %bcond_without load_extension # enable load extension API
11 %bcond_with icu # ICU tokenizer support
13 %ifarch alpha sparc %{x8664}
17 # disabling tcl currently breaks making test target,
18 # some hack in Makefile needs to be done
23 # sqlite3 version with zero padded without any dots (3 08 10 01 is 3.8.10.1)
27 Summary: SQLite library
28 Summary(pl.UTF-8): Biblioteka SQLite
32 License: Public Domain
34 # Source0Download: http://www.sqlite.org/download.html
35 Source0: http://www.sqlite.org/2015/sqlite-src-%{vnum}.zip
36 # Source0-md5: 5d717638b97b3be1a4d855d957028738
37 Patch0: %{name}-sign-function.patch
38 URL: http://www.sqlite.org/
39 %{?with_load_extension:Provides: %{name}(load_extension)}
40 %{?with_unlock_notify:Provides: %{name}(unlock_notify)}
41 %{?with_icu:Provides: %{name}(icu)}
42 BuildRequires: autoconf >= 2.50
43 BuildRequires: automake
44 BuildRequires: libtool
45 BuildRequires: readline-devel
46 %{?with_load_extension:BuildRequires: sed >= 4.0}
48 %{?with_tcl:BuildRequires: tcl-devel >= %{tclver}}
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define _ulibdir /usr/lib
55 SQLite is a C library that implements an SQL database engine. A large
56 subset of SQL92 is supported. A complete database is stored in a
57 single disk file. The API is designed for convenience and ease of use.
58 Applications that link against SQLite can enjoy the power and
59 flexiblity of an SQL database without the administrative hassles of
60 supporting a separate database server. Because it omits the
61 client-server interaction overhead and writes directly to disk, SQLite
62 is also faster than the big database servers for most operations. In
63 addition to the C library, the SQLite distribution includes a
64 command-line tool for interacting with SQLite databases and SQLite
67 %description -l pl.UTF-8
68 SQLite jest biblioteką języka C, która implementuje silnik baz danych
69 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
70 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
71 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
72 danych bez konieczności utrzymywania osobnego serwera baz danych.
73 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
74 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
75 bazodanowych przy większości operacji na bazie danych. Dodatkowo
76 oprócz biblioteki języka C, dostarczany jest program do zarządzania
80 Summary: Header files for SQLite development
81 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
82 Group: Development/Libraries
83 Requires: %{name} = %{version}-%{release}
84 %if %{with unlock_notify}
85 Provides: %{name}-devel(unlock_notify)
87 %if %{with load_extension}
88 Provides: %{name}-devel(load_extension)
91 Provides: %{name}-devel(icu)
95 SQLite is a C library that implements an SQL database engine. A large
96 subset of SQL92 is supported. A complete database is stored in a
97 single disk file. The API is designed for convenience and ease of use.
98 Applications that link against SQLite can enjoy the power and
99 flexiblity of an SQL database without the administrative hassles of
100 supporting a separate database server. Because it omits the
101 client-server interaction overhead and writes directly to disk, SQLite
102 is also faster than the big database servers for most operations. In
103 addition to the C library, the SQLite distribution includes a
104 command-line tool for interacting with SQLite databases and SQLite
107 This package contains the header files needed to develop programs that
110 %description devel -l pl.UTF-8
111 SQLite jest biblioteką języka C, która implementuje silnik baz danych
112 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
113 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
114 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
115 danych bez konieczności utrzymywania osobnego serwera baz danych.
116 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
117 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
118 bazodanowych przy większości operacji na bazie danych. Dodatkowo
119 oprócz biblioteki języka C, dostarczany jest program do zarządzania
122 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
123 używających biblioteki SQLite.
126 Summary: Static libraries for SQLite development
127 Summary(pl.UTF-8): Statyczne biblioteki SQLite
128 Group: Development/Libraries
129 Requires: %{name}-devel = %{version}-%{release}
130 %if %{with unclock_notify}
131 Provides: %{name}-static(unlock_notify)
133 %if %{with load_extension}
134 Provides: %{name}-static(load_extension)
138 SQLite is a C library that implements an SQL database engine. A large
139 subset of SQL92 is supported. A complete database is stored in a
140 single disk file. The API is designed for convenience and ease of use.
141 Applications that link against SQLite can enjoy the power and
142 flexiblity of an SQL database without the administrative hassles of
143 supporting a separate database server. Because it omits the
144 client-server interaction overhead and writes directly to disk, SQLite
145 is also faster than the big database servers for most operations. In
146 addition to the C library, the SQLite distribution includes a
147 command-line tool for interacting with SQLite databases and SQLite
150 This package contains the static SQLite libraries.
152 %description static -l pl.UTF-8
153 SQLite jest biblioteką języka C, która implementuje silnik baz danych
154 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
155 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
156 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
157 danych bez konieczności utrzymywania osobnego serwera baz danych.
158 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
159 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
160 bazodanowych przy większości operacji na bazie danych. Dodatkowo
161 oprócz biblioteki języka C, dostarczany jest program do zarządzania
164 Pakiet zawiera statyczne biblioteki SQLite.
166 %package -n tcl-%{name}
167 Summary: sqlite3 tcl extension
168 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
169 Group: Development/Languages/Tcl
171 %description -n tcl-%{name}
172 sqlite3 tcl extension.
174 %description -n tcl-%{name} -l pl.UTF-8
175 Rozszerzenie sqlite3 dla Tcl.
178 %setup -q -n sqlite-src-%{vnum}
181 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile.in
183 if [ "$(cat VERSION)" != "%{version}" ]; then
184 echo "Tarball content doesn't match version %{version}." >&2
190 cp -f /usr/share/automake/config.sub .
194 CPPFLAGS="$CPPFLAGS $*"
199 export CPPFLAGS="%{rpmcflags}"
202 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
205 append-cppflags -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE
207 # Support column metadata functions.
208 # http://sqlite.org/c3ref/column_database_name.html
209 # http://sqlite.org/c3ref/table_column_metadata.html
210 append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
212 # Support Full-Text Search versions 3 and 4.
213 # http://sqlite.org/fts3.html
214 #append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61
215 append-cppflags -DSQLITE_ENABLE_FTS3
218 # http://sqlite.org/rtree.html
219 append-cppflags -DSQLITE_ENABLE_RTREE
221 # Support soundex() function.
222 # http://sqlite.org/lang_corefunc.html#soundex
223 #append-cppflags -DSQLITE_SOUNDEX
225 %if %{with unlock_notify}
226 # Support unlock notification.
227 # http://sqlite.org/unlock_notify.html
228 append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
232 append-cppflags -DSQLITE_ENABLE_ICU
233 append-libs "-licui18n -licuuc"
236 %if %{with load_extension}
241 %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
242 %{__enable_disable load_extension load-extension} \
251 %{?with_tests:LC_ALL=C %{__make} test}
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
257 DESTDIR=$RPM_BUILD_ROOT
259 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
260 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
261 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
262 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
264 cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
267 rm -rf $RPM_BUILD_ROOT
269 %post -p /sbin/ldconfig
270 %postun -p /sbin/ldconfig
273 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_bindir}/sqlite3
276 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
277 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
278 %{_mandir}/man1/sqlite3.1*
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/libsqlite3.so
283 %{_libdir}/libsqlite3.la
284 %{_includedir}/sqlite3.h
285 %{_includedir}/sqlite3ext.h
286 %{_pkgconfigdir}/sqlite3.pc
289 %defattr(644,root,root,755)
290 %{_libdir}/libsqlite3.a
293 %files -n tcl-%{name}
294 %defattr(644,root,root,755)
295 %dir %{_libdir}/tcl*/sqlite3
296 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
297 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl