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