2 # - some tests fail with tcl8.5, it's tcl fault,
3 # if someone REALLY cares (s)he can look into it
4 # - sqlite binary is linked statically with sqlite library
7 %bcond_with tests # run tests
8 %bcond_with readline # readline (GPL) instead of libedit
9 %bcond_without tcl # Tcl extension
10 %bcond_without doc # disable documentation building
11 %bcond_without unlock_notify # disable unlock notify API
12 %bcond_without load_extension # enable load extension API
13 %bcond_with icu # ICU tokenizer support
15 %ifarch alpha sparc %{x8664}
19 # disabling tcl currently breaks making test target,
20 # some hack in Makefile needs to be done
25 # sqlite3 version with zero padded without any dots (3 08 10 01 is 3.8.10.1)
26 # but trailing 00 means no 4rd part (3 11 01 00 is 3.11.1)
28 %define ver %{lua:vn=rpm.expand("%vnum");v="";for i in string.gmatch(string.format("%08d", vn), "..") do v=v.."."..i:gsub("^0", "");end;v=v:gsub("^.",""):gsub("\.0$","");print(v)}
31 Summary: SQLite3 library
32 Summary(pl.UTF-8): Biblioteka SQLite3
36 License: Public Domain
38 # Source0Download: http://www.sqlite.org/download.html
39 Source0: http://www.sqlite.org/2018/sqlite-src-%{vnum}.zip
40 # Source0-md5: 4aa37b7b3cf5bd708dae325a0a0d440e
41 Patch0: %{name}-sign-function.patch
42 URL: http://www.sqlite.org/
43 BuildRequires: autoconf >= 2.50
44 BuildRequires: automake
45 %{!?with_readline:BuildRequires: libedit-devel}
46 BuildRequires: libtool
47 %{?with_readline:BuildRequires: readline-devel}
48 %{?with_load_extension:BuildRequires: sed >= 4.0}
50 %{?with_tcl:BuildRequires: tcl-devel >= %{tclver}}
52 Requires: %{name}-libs = %{version}-%{release}
53 %{?with_icu:Provides: %{name}(icu) = %{version}}
54 %{?with_load_extension:Provides: %{name}(load_extension) = %{version}}
55 %{?with_unlock_notify:Provides: %{name}(unlock_notify) = %{version}}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _ulibdir /usr/lib
61 SQLite is a C library that implements an SQL database engine. A large
62 subset of SQL92 is supported. A complete database is stored in a
63 single disk file. The API is designed for convenience and ease of use.
64 Applications that link against SQLite can enjoy the power and
65 flexiblity of an SQL database without the administrative hassles of
66 supporting a separate database server. Because it omits the
67 client-server interaction overhead and writes directly to disk, SQLite
68 is also faster than the big database servers for most operations. In
69 addition to the C library, the SQLite distribution includes a
70 command-line tool for interacting with SQLite databases and SQLite
73 %description -l pl.UTF-8
74 SQLite jest biblioteką języka C, która implementuje silnik baz danych
75 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
76 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
77 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
78 danych bez konieczności utrzymywania osobnego serwera baz danych.
79 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
80 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
81 bazodanowych przy większości operacji na bazie danych. Dodatkowo
82 oprócz biblioteki języka C, dostarczany jest program do zarządzania
86 Summary: Shared library for the sqlite3 embeddable SQL database engine
87 Summary(pl.UTF-8): Biblioteka współdzielona osadzalnego silnika baz danych SQL sqlite3
89 %{?with_icu:Provides: %{name}-libs(icu) = %{version}}
90 %{?with_load_extension:Provides: %{name}-libs(load_extension) = %{version}}
91 %{?with_unlock_notify:Provides: %{name}-libs(unlock_notify) = %{version}}
92 Conflicts: sqlite3 < 3.23.1-2
95 This package contains the SQLite 3 shared library.
97 %description libs -l pl.UTF-8
98 Ten pakiet zawiera bibliotekę współdzieloną SQLite 3.
101 Summary: Header files for SQLite development
102 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
103 Group: Development/Libraries
104 Requires: %{name}-libs = %{version}-%{release}
105 %if %{with unlock_notify}
106 Provides: %{name}-devel(unlock_notify) = %{version}
108 %if %{with load_extension}
109 Provides: %{name}-devel(load_extension) = %{version}
112 Provides: %{name}-devel(icu) = %{version}
116 SQLite is a C library that implements an SQL database engine. A large
117 subset of SQL92 is supported. A complete database is stored in a
118 single disk file. The API is designed for convenience and ease of use.
119 Applications that link against SQLite can enjoy the power and
120 flexiblity of an SQL database without the administrative hassles of
121 supporting a separate database server. Because it omits the
122 client-server interaction overhead and writes directly to disk, SQLite
123 is also faster than the big database servers for most operations. In
124 addition to the C library, the SQLite distribution includes a
125 command-line tool for interacting with SQLite databases and SQLite
128 This package contains the header files needed to develop programs that
131 %description devel -l pl.UTF-8
132 SQLite jest biblioteką języka C, która implementuje silnik baz danych
133 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
134 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
135 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
136 danych bez konieczności utrzymywania osobnego serwera baz danych.
137 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
138 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
139 bazodanowych przy większości operacji na bazie danych. Dodatkowo
140 oprócz biblioteki języka C, dostarczany jest program do zarządzania
143 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
144 używających biblioteki SQLite.
147 Summary: Static libraries for SQLite development
148 Summary(pl.UTF-8): Statyczne biblioteki SQLite
149 Group: Development/Libraries
150 Requires: %{name}-devel = %{version}-%{release}
151 %if %{with unclock_notify}
152 Provides: %{name}-static(unlock_notify)
154 %if %{with load_extension}
155 Provides: %{name}-static(load_extension)
159 SQLite is a C library that implements an SQL database engine. A large
160 subset of SQL92 is supported. A complete database is stored in a
161 single disk file. The API is designed for convenience and ease of use.
162 Applications that link against SQLite can enjoy the power and
163 flexiblity of an SQL database without the administrative hassles of
164 supporting a separate database server. Because it omits the
165 client-server interaction overhead and writes directly to disk, SQLite
166 is also faster than the big database servers for most operations. In
167 addition to the C library, the SQLite distribution includes a
168 command-line tool for interacting with SQLite databases and SQLite
171 This package contains the static SQLite libraries.
173 %description static -l pl.UTF-8
174 SQLite jest biblioteką języka C, która implementuje silnik baz danych
175 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
176 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
177 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
178 danych bez konieczności utrzymywania osobnego serwera baz danych.
179 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
180 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
181 bazodanowych przy większości operacji na bazie danych. Dodatkowo
182 oprócz biblioteki języka C, dostarczany jest program do zarządzania
185 Pakiet zawiera statyczne biblioteki SQLite.
187 %package -n tcl-%{name}
188 Summary: sqlite3 tcl extension
189 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
190 Group: Development/Languages/Tcl
192 %description -n tcl-%{name}
193 sqlite3 tcl extension.
195 %description -n tcl-%{name} -l pl.UTF-8
196 Rozszerzenie sqlite3 dla Tcl.
199 %setup -q -n sqlite-src-%{vnum}
202 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile.in
204 if [ "$(cat VERSION)" != "%{version}" ]; then
205 echo "Tarball content doesn't match version %{version}." >&2
211 cp -f /usr/share/automake/config.sub .
213 %{__autoconf} --force
215 CPPFLAGS="$CPPFLAGS $*"
220 export CPPFLAGS="%{rpmcflags}"
223 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
226 append-cppflags -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE
228 # Support for optional ORDER BY and LIMIT clause on UPDATE and DELETE statements
229 append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
231 # Support column metadata functions.
232 # http://sqlite.org/c3ref/column_database_name.html
233 # http://sqlite.org/c3ref/table_column_metadata.html
234 append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
236 # Support Full-Text Search versions 3 and 4.
237 # http://sqlite.org/fts3.html
238 #append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61
239 append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
240 append-cppflags -DSQLITE_ENABLE_FTS3_TOKENIZER
243 # http://sqlite.org/rtree.html
244 append-cppflags -DSQLITE_ENABLE_RTREE
246 # Support Geopoly module (new as of 3.25.0)
247 # https://www.sqlite.org/geopoly.html
248 append-cppflags -DSQLITE_ENABLE_GEOPOLY
250 # Support soundex() function.
251 # http://sqlite.org/lang_corefunc.html#soundex
252 #append-cppflags -DSQLITE_SOUNDEX
254 # Support dbstat virtual table.
255 # https://www.sqlite.org/dbstat.html
256 append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
258 # Support for session extension (record changes to a changeset).
259 # https://www.sqlite.org/sessionintro.html
260 append-cppflags -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK
262 %if %{with unlock_notify}
263 # Support unlock notification.
264 # http://sqlite.org/unlock_notify.html
265 append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
269 append-cppflags -DSQLITE_ENABLE_ICU
270 append-libs "-licui18n -licuuc"
273 %if %{with load_extension}
278 %{?with_readline:--disable-editline} \
279 %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
280 %{__enable_disable load_extension load-extension} \
281 --enable-threadsafe \
290 %{?with_tests:LC_ALL=C %{__make} test}
293 rm -rf $RPM_BUILD_ROOT
294 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
297 DESTDIR=$RPM_BUILD_ROOT
299 %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
300 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
301 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
302 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
304 cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
307 rm -rf $RPM_BUILD_ROOT
309 %post libs -p /sbin/ldconfig
310 %postun libs -p /sbin/ldconfig
313 %defattr(644,root,root,755)
314 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
315 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
318 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_bindir}/sqlite3
321 %{_mandir}/man1/sqlite3.1*
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_libdir}/libsqlite3.so
326 %{_libdir}/libsqlite3.la
327 %{_includedir}/sqlite3.h
328 %{_includedir}/sqlite3ext.h
329 %{_pkgconfigdir}/sqlite3.pc
332 %defattr(644,root,root,755)
333 %{_libdir}/libsqlite3.a
336 %files -n tcl-%{name}
337 %defattr(644,root,root,755)
338 %dir %{_libdir}/tcl*/sqlite3
339 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
340 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl