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