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