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