]> git.pld-linux.org Git - packages/sqlite3.git/blame - sqlite3.spec
- updated to 3.30.0
[packages/sqlite3.git] / sqlite3.spec
CommitLineData
c743401f 1# TODO:
f1015391
JR
2# - some tests fail with tcl8.5, it's tcl fault,
3# if someone REALLY cares (s)he can look into it
a1eaf1bc 4# - sqlite binary is linked statically with sqlite library
17b8c9f1 5#
6# Conditional build:
d12e8042 7%bcond_with tests # run tests
0d754db8 8%bcond_with readline # readline (GPL) instead of libedit
dd55e3fd 9%bcond_without tcl # Tcl extension
d12e8042
JB
10%bcond_without doc # disable documentation building
11%bcond_without unlock_notify # disable unlock notify API
60f66380 12%bcond_without load_extension # enable load extension API
cd683928 13%bcond_with icu # ICU tokenizer support
17f8454c 14%bcond_without wal_replication # WAL replication support
5df4522e 15
017ee24e 16%ifarch %{x8664}
f1015391
JR
17%undefine with_tests
18%endif
19
20# disabling tcl currently breaks making test target,
21# some hack in Makefile needs to be done
5df4522e 22%if %{without tcl}
f1015391
JR
23%undefine with_tests
24%endif
25
bd752bde 26# sqlite3 version with zero padded without any dots (3 08 10 01 is 3.8.10.1)
ea9e16e8 27# but trailing 00 means no 4rd part (3 11 01 00 is 3.11.1)
15c2a20c 28%define vnum 3300000
9a9b0472 29%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)}
2742ec36 30
a1370bcb 31# wal replication version
66b9b603 32%define walver 3.29.0
a1370bcb 33
a8925d97 34%define tclver 8.6
943b1d56
ER
35Summary: SQLite3 library
36Summary(pl.UTF-8): Biblioteka SQLite3
22ef5ab8 37Name: sqlite3
ca3d7890 38Version: %{ver}
15c2a20c 39Release: 1
dd55e3fd 40License: Public Domain
17b8c9f1 41Group: Libraries
65cfa56f 42# Source0Download: http://www.sqlite.org/download.html
2652c235 43Source0: https://www.sqlite.org/2019/sqlite-src-%{vnum}.zip
15c2a20c 44# Source0-md5: d6f8f11b12ea3e1bdf3332bcc0b97117
a3d8a32d 45Patch0: %{name}-sign-function.patch
298b71bf 46# https://github.com/CanonicalLtd/dqlite/issues/91
7467d964 47Patch1: https://github.com/CanonicalLtd/sqlite/releases/download/version-%{walver}+replication3/sqlite-%{walver}.diff
66b9b603 48# Patch1-md5: 6707a179ad80076f290a54e424c488c8
2652c235 49URL: https://www.sqlite.org/
dd55e3fd 50BuildRequires: autoconf >= 2.50
17b8c9f1 51BuildRequires: automake
0d754db8 52%{!?with_readline:BuildRequires: libedit-devel}
17b8c9f1 53BuildRequires: libtool
0d754db8 54%{?with_readline:BuildRequires: readline-devel}
6ca4ac16 55%{?with_load_extension:BuildRequires: sed >= 4.0}
0e44e992 56BuildRequires: tcl
a8925d97 57%{?with_tcl:BuildRequires: tcl-devel >= %{tclver}}
086e11d9 58BuildRequires: unzip
a1eaf1bc 59Requires: %{name}-libs = %{version}-%{release}
3b448fcb
JB
60%{?with_icu:Provides: %{name}(icu) = %{version}}
61%{?with_load_extension:Provides: %{name}(load_extension) = %{version}}
62%{?with_unlock_notify:Provides: %{name}(unlock_notify) = %{version}}
17f8454c 63%{?with_wal_replication:Provides: %{name}(wal_replication) = %{version}}
17b8c9f1 64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
9ff1c54d
ER
66%define _ulibdir /usr/lib
67
17b8c9f1 68%description
69SQLite is a C library that implements an SQL database engine. A large
70subset of SQL92 is supported. A complete database is stored in a
71single disk file. The API is designed for convenience and ease of use.
72Applications that link against SQLite can enjoy the power and
73flexiblity of an SQL database without the administrative hassles of
74supporting a separate database server. Because it omits the
75client-server interaction overhead and writes directly to disk, SQLite
76is also faster than the big database servers for most operations. In
77addition to the C library, the SQLite distribution includes a
78command-line tool for interacting with SQLite databases and SQLite
79bindings for Tcl/Tk.
80
b7c0e1f2
JR
81%description -l pl.UTF-8
82SQLite jest biblioteką języka C, która implementuje silnik baz danych
83SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
84przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
85bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
86danych bez konieczności utrzymywania osobnego serwera baz danych.
87Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
88bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
89bazodanowych przy większości operacji na bazie danych. Dodatkowo
90oprócz biblioteki języka C, dostarczany jest program do zarządzania
17b8c9f1 91bazami danych.
92
a1eaf1bc
ER
93%package libs
94Summary: Shared library for the sqlite3 embeddable SQL database engine
3b448fcb 95Summary(pl.UTF-8): Biblioteka współdzielona osadzalnego silnika baz danych SQL sqlite3
a1eaf1bc 96Group: Libraries
3b448fcb
JB
97%{?with_icu:Provides: %{name}-libs(icu) = %{version}}
98%{?with_load_extension:Provides: %{name}-libs(load_extension) = %{version}}
99%{?with_unlock_notify:Provides: %{name}-libs(unlock_notify) = %{version}}
17f8454c 100%{?with_wal_replication:Provides: %{name}-libs(wal_replication) = %{version}}
3b448fcb 101Conflicts: sqlite3 < 3.23.1-2
a1eaf1bc
ER
102
103%description libs
3b448fcb
JB
104This package contains the SQLite 3 shared library.
105
106%description libs -l pl.UTF-8
107Ten pakiet zawiera bibliotekę współdzieloną SQLite 3.
a1eaf1bc 108
17b8c9f1 109%package devel
110Summary: Header files for SQLite development
e882a99f 111Summary(pl.UTF-8): Pliki nagłówkowe SQLite
17b8c9f1 112Group: Development/Libraries
a1eaf1bc 113Requires: %{name}-libs = %{version}-%{release}
d70f95dc 114%if %{with unlock_notify}
3b448fcb 115Provides: %{name}-devel(unlock_notify) = %{version}
d70f95dc 116%endif
117%if %{with load_extension}
3b448fcb 118Provides: %{name}-devel(load_extension) = %{version}
d70f95dc 119%endif
e0fdf246 120%if %{with icu}
3b448fcb 121Provides: %{name}-devel(icu) = %{version}
e0fdf246 122%endif
17f8454c 123%{?with_wal_replication:Provides: %{name}-devel(wal_replication) = %{version}}
17b8c9f1 124
125%description devel
126SQLite is a C library that implements an SQL database engine. A large
127subset of SQL92 is supported. A complete database is stored in a
128single disk file. The API is designed for convenience and ease of use.
129Applications that link against SQLite can enjoy the power and
130flexiblity of an SQL database without the administrative hassles of
131supporting a separate database server. Because it omits the
132client-server interaction overhead and writes directly to disk, SQLite
133is also faster than the big database servers for most operations. In
134addition to the C library, the SQLite distribution includes a
135command-line tool for interacting with SQLite databases and SQLite
136bindings for Tcl/Tk.
137
138This package contains the header files needed to develop programs that
139use these SQLite.
140
b7c0e1f2
JR
141%description devel -l pl.UTF-8
142SQLite jest biblioteką języka C, która implementuje silnik baz danych
143SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
144przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
145bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
146danych bez konieczności utrzymywania osobnego serwera baz danych.
147Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
148bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
149bazodanowych przy większości operacji na bazie danych. Dodatkowo
150oprócz biblioteki języka C, dostarczany jest program do zarządzania
17b8c9f1 151bazami danych.
152
b7c0e1f2
JR
153Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
154używających biblioteki SQLite.
17b8c9f1 155
156%package static
157Summary: Static libraries for SQLite development
e882a99f 158Summary(pl.UTF-8): Statyczne biblioteki SQLite
17b8c9f1 159Group: Development/Libraries
160Requires: %{name}-devel = %{version}-%{release}
d70f95dc 161%if %{with unclock_notify}
d70f95dc 162Provides: %{name}-static(unlock_notify)
163%endif
164%if %{with load_extension}
d70f95dc 165Provides: %{name}-static(load_extension)
166%endif
17f8454c 167%{?with_wal_replication:Provides: %{name}-static(wal_replication)}
17b8c9f1 168
169%description static
170SQLite is a C library that implements an SQL database engine. A large
171subset of SQL92 is supported. A complete database is stored in a
172single disk file. The API is designed for convenience and ease of use.
173Applications that link against SQLite can enjoy the power and
174flexiblity of an SQL database without the administrative hassles of
175supporting a separate database server. Because it omits the
176client-server interaction overhead and writes directly to disk, SQLite
177is also faster than the big database servers for most operations. In
178addition to the C library, the SQLite distribution includes a
179command-line tool for interacting with SQLite databases and SQLite
180bindings for Tcl/Tk.
181
182This package contains the static SQLite libraries.
183
b7c0e1f2
JR
184%description static -l pl.UTF-8
185SQLite jest biblioteką języka C, która implementuje silnik baz danych
186SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
187przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
188bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
189danych bez konieczności utrzymywania osobnego serwera baz danych.
190Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
191bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
192bazodanowych przy większości operacji na bazie danych. Dodatkowo
193oprócz biblioteki języka C, dostarczany jest program do zarządzania
17b8c9f1 194bazami danych.
195
196Pakiet zawiera statyczne biblioteki SQLite.
197
c743401f 198%package -n tcl-%{name}
8e66772b 199Summary: sqlite3 tcl extension
e882a99f 200Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
8e66772b 201Group: Development/Languages/Tcl
c743401f
AM
202
203%description -n tcl-%{name}
204sqlite3 tcl extension.
205
b7c0e1f2 206%description -n tcl-%{name} -l pl.UTF-8
c743401f
AM
207Rozszerzenie sqlite3 dla Tcl.
208
17b8c9f1 209%prep
65430f84 210%setup -q -n sqlite-src-%{vnum}
30682d5a 211%patch0 -p1
17f8454c 212%{?with_wal_replication:%patch1 -p1}
1cd2f537 213
fc29cfbe 214%{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile.in
faed6cf7 215
9a9b0472 216if [ "$(cat VERSION)" != "%{version}" ]; then
78ed83ff
AM
217 echo "Tarball content doesn't match version %{version}." >&2
218 exit 1
219fi
220
17b8c9f1 221%build
222%{__libtoolize}
223cp -f /usr/share/automake/config.sub .
224%{__aclocal}
16787c3a 225%{__autoconf} --force
fc29cfbe
ER
226append-cppflags() {
227 CPPFLAGS="$CPPFLAGS $*"
228}
229append-libs() {
230 LIBS="$LIBS $*"
231}
232export CPPFLAGS="%{rpmcflags}"
233export LIBS
87af9815
MB
234%if %{with tcl}
235export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
236%endif
e0fdf246 237
fc29cfbe
ER
238append-cppflags -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE
239
7342856f
AG
240# Support for optional ORDER BY and LIMIT clause on UPDATE and DELETE statements
241append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
242
fc29cfbe
ER
243# Support column metadata functions.
244# http://sqlite.org/c3ref/column_database_name.html
245# http://sqlite.org/c3ref/table_column_metadata.html
246append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
247
248# Support Full-Text Search versions 3 and 4.
249# http://sqlite.org/fts3.html
250#append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61
2cf6a747 251append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
61a0da0a 252append-cppflags -DSQLITE_ENABLE_FTS3_TOKENIZER
fc29cfbe
ER
253
254# Support R*Trees.
255# http://sqlite.org/rtree.html
256append-cppflags -DSQLITE_ENABLE_RTREE
257
7342856f
AG
258# Support Geopoly module (new as of 3.25.0)
259# https://www.sqlite.org/geopoly.html
260append-cppflags -DSQLITE_ENABLE_GEOPOLY
261
fc29cfbe
ER
262# Support soundex() function.
263# http://sqlite.org/lang_corefunc.html#soundex
264#append-cppflags -DSQLITE_SOUNDEX
265
806c4314
JR
266# Support dbstat virtual table.
267# https://www.sqlite.org/dbstat.html
268append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
269
7342856f
AG
270# Support for session extension (record changes to a changeset).
271# https://www.sqlite.org/sessionintro.html
272append-cppflags -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK
273
fc29cfbe
ER
274%if %{with unlock_notify}
275# Support unlock notification.
276# http://sqlite.org/unlock_notify.html
277append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
278%endif
279
280%if %{with icu}
281append-cppflags -DSQLITE_ENABLE_ICU
282append-libs "-licui18n -licuuc"
283%endif
284
285%if %{with load_extension}
286append-libs "-ldl"
287%endif
288
17f8454c
AM
289%if %{with wal_replication}
290# A patched version of SQLite with support for WAL-based replication
291append-cppflags -DSQLITE_ENABLE_WAL_REPLICATION
292%endif
293
17b8c9f1 294%configure \
0d754db8 295 %{?with_readline:--disable-editline} \
e0fdf246 296 %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
60f66380 297 %{__enable_disable load_extension load-extension} \
4522125d
MB
298 --enable-threadsafe \
299 --enable-fts5
60f66380 300
5df4522e 301%{__make}
1a6aae8d 302
e16bc4b1 303%if %{with doc}
17b8c9f1 304%{__make} doc
1a6aae8d 305%endif
17b8c9f1 306
3e5df83c 307%{?with_tests:LC_ALL=C %{__make} test}
17b8c9f1 308
309%install
310rm -rf $RPM_BUILD_ROOT
1c91d9d5 311install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
0d754db8 312
17b8c9f1 313%{__make} install \
dd55e3fd 314 DESTDIR=$RPM_BUILD_ROOT
ec30f86a 315
0d754db8 316%{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
dd55e3fd 317%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
1c91d9d5
JR
318ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
319 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
320
e0fdf246 321cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
17b8c9f1 322
323%clean
324rm -rf $RPM_BUILD_ROOT
325
a1eaf1bc
ER
326%post libs -p /sbin/ldconfig
327%postun libs -p /sbin/ldconfig
328
329%files libs
330%defattr(644,root,root,755)
331%attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
332%attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
17b8c9f1 333
334%files
335%defattr(644,root,root,755)
a8925d97 336%doc README.md
17b8c9f1 337%attr(755,root,root) %{_bindir}/sqlite3
c743401f 338%{_mandir}/man1/sqlite3.1*
17b8c9f1 339
340%files devel
341%defattr(644,root,root,755)
7e92c022
JB
342%attr(755,root,root) %{_libdir}/libsqlite3.so
343%{_libdir}/libsqlite3.la
17b8c9f1 344%{_includedir}/sqlite3.h
ef88c71c 345%{_includedir}/sqlite3ext.h
7e92c022 346%{_pkgconfigdir}/sqlite3.pc
17b8c9f1 347
348%files static
349%defattr(644,root,root,755)
7e92c022 350%{_libdir}/libsqlite3.a
c743401f 351
1a6aae8d 352%if %{with tcl}
c743401f
AM
353%files -n tcl-%{name}
354%defattr(644,root,root,755)
80deaf18 355%dir %{_libdir}/tcl*/sqlite3
7e92c022
JB
356%attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
357%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
1a6aae8d 358%endif
This page took 0.113832 seconds and 4 git commands to generate.