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