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