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: e7932e95208f9fd903f19459e2c09121
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 column metadata functions.
229 # http://sqlite.org/c3ref/column_database_name.html
230 # http://sqlite.org/c3ref/table_column_metadata.html
231 append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
233 # Support Full-Text Search versions 3 and 4.
234 # http://sqlite.org/fts3.html
235 #append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61
236 append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
237 append-cppflags -DSQLITE_ENABLE_FTS3_TOKENIZER
240 # http://sqlite.org/rtree.html
241 append-cppflags -DSQLITE_ENABLE_RTREE
243 # Support soundex() function.
244 # http://sqlite.org/lang_corefunc.html#soundex
245 #append-cppflags -DSQLITE_SOUNDEX
247 # Support dbstat virtual table.
248 # https://www.sqlite.org/dbstat.html
249 append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
251 %if %{with unlock_notify}
252 # Support unlock notification.
253 # http://sqlite.org/unlock_notify.html
254 append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
258 append-cppflags -DSQLITE_ENABLE_ICU
259 append-libs "-licui18n -licuuc"
262 %if %{with load_extension}
267 %{?with_readline:--disable-editline} \
268 %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
269 %{__enable_disable load_extension load-extension} \
270 --enable-threadsafe \
279 %{?with_tests:LC_ALL=C %{__make} test}
282 rm -rf $RPM_BUILD_ROOT
283 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
286 DESTDIR=$RPM_BUILD_ROOT
288 %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
289 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
290 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
291 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
293 cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
296 rm -rf $RPM_BUILD_ROOT
298 %post libs -p /sbin/ldconfig
299 %postun libs -p /sbin/ldconfig
302 %defattr(644,root,root,755)
303 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
304 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
307 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_bindir}/sqlite3
310 %{_mandir}/man1/sqlite3.1*
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_libdir}/libsqlite3.so
315 %{_libdir}/libsqlite3.la
316 %{_includedir}/sqlite3.h
317 %{_includedir}/sqlite3ext.h
318 %{_pkgconfigdir}/sqlite3.pc
321 %defattr(644,root,root,755)
322 %{_libdir}/libsqlite3.a
325 %files -n tcl-%{name}
326 %defattr(644,root,root,755)
327 %dir %{_libdir}/tcl*/sqlite3
328 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
329 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl