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