2 # - some tests fail with tcl8.5, it's tcl fault,
3 # if someone REALLY cares (s)he can look into it
5 # tclsh ./tool/mksqlite3c.tcl
6 # tclsh: allocatestack.c:404: allocate_stack: Assertion `size != 0' failed.
7 # make: *** [sqlite3.c] Aborted
10 %bcond_with tests # run tests
11 %bcond_with tcl # enable tcl extension
12 %bcond_without doc # disable documentation building
14 %ifarch alpha sparc %{x8664}
18 # disabling tcl currently breaks making test target,
19 # some hack in Makefile needs to be done
24 %define _ulibdir /usr/lib
27 Summary: SQLite library
28 Summary(pl.UTF-8): Biblioteka SQLite
34 # Source0Download: http://www.sqlite.org/download.html
35 Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
36 # Source0-md5: 7ebb099696ab76cc6ff65dd496d17858
37 Patch0: %{name}-sign-function.patch
38 URL: http://www.sqlite.org/
39 BuildRequires: autoconf
40 BuildRequires: automake
41 BuildRequires: libtool
42 BuildRequires: readline-devel
43 %{?with_tcl:BuildRequires: tcl-devel}
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 SQLite is a C library that implements an SQL database engine. A large
48 subset of SQL92 is supported. A complete database is stored in a
49 single disk file. The API is designed for convenience and ease of use.
50 Applications that link against SQLite can enjoy the power and
51 flexiblity of an SQL database without the administrative hassles of
52 supporting a separate database server. Because it omits the
53 client-server interaction overhead and writes directly to disk, SQLite
54 is also faster than the big database servers for most operations. In
55 addition to the C library, the SQLite distribution includes a
56 command-line tool for interacting with SQLite databases and SQLite
59 %description -l pl.UTF-8
60 SQLite jest biblioteką języka C, która implementuje silnik baz danych
61 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
62 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
63 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
64 danych bez konieczności utrzymywania osobnego serwera baz danych.
65 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
66 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
67 bazodanowych przy większości operacji na bazie danych. Dodatkowo
68 oprócz biblioteki języka C, dostarczany jest program do zarządzania
72 Summary: Header files for SQLite development
73 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
78 SQLite is a C library that implements an SQL database engine. A large
79 subset of SQL92 is supported. A complete database is stored in a
80 single disk file. The API is designed for convenience and ease of use.
81 Applications that link against SQLite can enjoy the power and
82 flexiblity of an SQL database without the administrative hassles of
83 supporting a separate database server. Because it omits the
84 client-server interaction overhead and writes directly to disk, SQLite
85 is also faster than the big database servers for most operations. In
86 addition to the C library, the SQLite distribution includes a
87 command-line tool for interacting with SQLite databases and SQLite
90 This package contains the header files needed to develop programs that
93 %description devel -l pl.UTF-8
94 SQLite jest biblioteką języka C, która implementuje silnik baz danych
95 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
96 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
97 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
98 danych bez konieczności utrzymywania osobnego serwera baz danych.
99 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
100 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
101 bazodanowych przy większości operacji na bazie danych. Dodatkowo
102 oprócz biblioteki języka C, dostarczany jest program do zarządzania
105 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
106 używających biblioteki SQLite.
109 Summary: Static libraries for SQLite development
110 Summary(pl.UTF-8): Statyczne biblioteki SQLite
111 Group: Development/Libraries
112 Requires: %{name}-devel = %{version}-%{release}
115 SQLite is a C library that implements an SQL database engine. A large
116 subset of SQL92 is supported. A complete database is stored in a
117 single disk file. The API is designed for convenience and ease of use.
118 Applications that link against SQLite can enjoy the power and
119 flexiblity of an SQL database without the administrative hassles of
120 supporting a separate database server. Because it omits the
121 client-server interaction overhead and writes directly to disk, SQLite
122 is also faster than the big database servers for most operations. In
123 addition to the C library, the SQLite distribution includes a
124 command-line tool for interacting with SQLite databases and SQLite
127 This package contains the static SQLite libraries.
129 %description static -l pl.UTF-8
130 SQLite jest biblioteką języka C, która implementuje silnik baz danych
131 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
132 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
133 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
134 danych bez konieczności utrzymywania osobnego serwera baz danych.
135 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
136 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
137 bazodanowych przy większości operacji na bazie danych. Dodatkowo
138 oprócz biblioteki języka C, dostarczany jest program do zarządzania
141 Pakiet zawiera statyczne biblioteki SQLite.
143 %package -n tcl-%{name}
144 Summary: sqlite3 tcl extension
145 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
146 Group: Development/Languages/Tcl
148 %description -n tcl-%{name}
149 sqlite3 tcl extension.
151 %description -n tcl-%{name} -l pl.UTF-8
152 Rozszerzenie sqlite3 dla Tcl.
155 %setup -q -n sqlite-%{version}
158 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
162 # wrapper script to reset stack to 8192 as if ran from make it's insanely huge!:
163 # stack(kbytes) 18014398509481983
164 cat <<'EOF' > tclsh.sh
174 cp -f /usr/share/automake/config.sub .
177 CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1"
180 %{?with_tcl:--with-tcl=%{_ulibdir}} \
181 %{!?with_tcl:--disable-tcl} \
192 %{?with_tests:LC_ALL=C %{__make} test}
195 rm -rf $RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
200 TCLSH_CMD=./tclsh.sh \
202 DESTDIR=$RPM_BUILD_ROOT \
203 TCLLIBDIR=%{_libdir}/tcl%{tclver}
206 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
209 install sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
212 rm -rf $RPM_BUILD_ROOT
214 %post -p /sbin/ldconfig
215 %postun -p /sbin/ldconfig
218 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_bindir}/sqlite3
221 %attr(755,root,root) %{_libdir}/libsqlite3.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libsqlite3.so.0
223 %{_mandir}/man1/sqlite3.1*
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_libdir}/libsqlite3.so
228 %{_libdir}/libsqlite3.la
229 %{_includedir}/sqlite3.h
230 %{_includedir}/sqlite3ext.h
231 %{_pkgconfigdir}/sqlite3.pc
234 %defattr(644,root,root,755)
235 %{_libdir}/libsqlite3.a
238 %files -n tcl-%{name}
239 %defattr(644,root,root,755)
240 %dir %{_libdir}/tcl*/sqlite3
241 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
242 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl