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