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
8 # - enable --enable-load-extension?
11 %bcond_with tests # run tests
12 %bcond_with tcl # enable tcl extension
13 %bcond_without doc # disable documentation building
15 %ifarch alpha sparc %{x8664}
19 # disabling tcl currently breaks making test target,
20 # some hack in Makefile needs to be done
25 %define _ulibdir /usr/lib
28 Summary: SQLite library
29 Summary(pl.UTF-8): Biblioteka SQLite
35 # Source0Download: http://www.sqlite.org/download.html
36 Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
37 # Source0-md5: 0faf8fc8ccff5297513c6532b2b4ce23
38 Patch0: %{name}-sign-function.patch
39 URL: http://www.sqlite.org/
40 BuildRequires: autoconf
41 BuildRequires: automake
42 BuildRequires: libtool
43 BuildRequires: readline-devel
45 %{?with_tcl:BuildRequires: tcl-devel}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 SQLite is a C library that implements an SQL database engine. A large
50 subset of SQL92 is supported. A complete database is stored in a
51 single disk file. The API is designed for convenience and ease of use.
52 Applications that link against SQLite can enjoy the power and
53 flexiblity of an SQL database without the administrative hassles of
54 supporting a separate database server. Because it omits the
55 client-server interaction overhead and writes directly to disk, SQLite
56 is also faster than the big database servers for most operations. In
57 addition to the C library, the SQLite distribution includes a
58 command-line tool for interacting with SQLite databases and SQLite
61 %description -l pl.UTF-8
62 SQLite jest biblioteką języka C, która implementuje silnik baz danych
63 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
64 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
65 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
66 danych bez konieczności utrzymywania osobnego serwera baz danych.
67 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
68 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
69 bazodanowych przy większości operacji na bazie danych. Dodatkowo
70 oprócz biblioteki języka C, dostarczany jest program do zarządzania
74 Summary: Header files for SQLite development
75 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
76 Group: Development/Libraries
77 Requires: %{name} = %{version}-%{release}
80 SQLite is a C library that implements an SQL database engine. A large
81 subset of SQL92 is supported. A complete database is stored in a
82 single disk file. The API is designed for convenience and ease of use.
83 Applications that link against SQLite can enjoy the power and
84 flexiblity of an SQL database without the administrative hassles of
85 supporting a separate database server. Because it omits the
86 client-server interaction overhead and writes directly to disk, SQLite
87 is also faster than the big database servers for most operations. In
88 addition to the C library, the SQLite distribution includes a
89 command-line tool for interacting with SQLite databases and SQLite
92 This package contains the header files needed to develop programs that
95 %description devel -l pl.UTF-8
96 SQLite jest biblioteką języka C, która implementuje silnik baz danych
97 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
98 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
99 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
100 danych bez konieczności utrzymywania osobnego serwera baz danych.
101 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
102 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
103 bazodanowych przy większości operacji na bazie danych. Dodatkowo
104 oprócz biblioteki języka C, dostarczany jest program do zarządzania
107 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
108 używających biblioteki SQLite.
111 Summary: Static libraries for SQLite development
112 Summary(pl.UTF-8): Statyczne biblioteki SQLite
113 Group: Development/Libraries
114 Requires: %{name}-devel = %{version}-%{release}
117 SQLite is a C library that implements an SQL database engine. A large
118 subset of SQL92 is supported. A complete database is stored in a
119 single disk file. The API is designed for convenience and ease of use.
120 Applications that link against SQLite can enjoy the power and
121 flexiblity of an SQL database without the administrative hassles of
122 supporting a separate database server. Because it omits the
123 client-server interaction overhead and writes directly to disk, SQLite
124 is also faster than the big database servers for most operations. In
125 addition to the C library, the SQLite distribution includes a
126 command-line tool for interacting with SQLite databases and SQLite
129 This package contains the static SQLite libraries.
131 %description static -l pl.UTF-8
132 SQLite jest biblioteką języka C, która implementuje silnik baz danych
133 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
134 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
135 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
136 danych bez konieczności utrzymywania osobnego serwera baz danych.
137 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
138 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
139 bazodanowych przy większości operacji na bazie danych. Dodatkowo
140 oprócz biblioteki języka C, dostarczany jest program do zarządzania
143 Pakiet zawiera statyczne biblioteki SQLite.
145 %package -n tcl-%{name}
146 Summary: sqlite3 tcl extension
147 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
148 Group: Development/Languages/Tcl
150 %description -n tcl-%{name}
151 sqlite3 tcl extension.
153 %description -n tcl-%{name} -l pl.UTF-8
154 Rozszerzenie sqlite3 dla Tcl.
157 %setup -q -n sqlite-%{version}
160 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
164 # wrapper script to reset stack to 8192 as if ran from make it's insanely huge!:
165 # stack(kbytes) 18014398509481983
166 cat <<'EOF' > tclsh.sh
176 cp -f /usr/share/automake/config.sub .
179 CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1"
182 %{?with_tcl:--with-tcl=%{_ulibdir}} \
183 %{!?with_tcl:--disable-tcl} \
194 %{?with_tests:LC_ALL=C %{__make} test}
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
202 TCLSH_CMD=./tclsh.sh \
204 DESTDIR=$RPM_BUILD_ROOT \
205 TCLLIBDIR=%{_libdir}/tcl%{tclver}
208 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
211 install sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
214 rm -rf $RPM_BUILD_ROOT
216 %post -p /sbin/ldconfig
217 %postun -p /sbin/ldconfig
220 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_bindir}/sqlite3
223 %attr(755,root,root) %{_libdir}/libsqlite3.so.*.*.*
224 %attr(755,root,root) %ghost %{_libdir}/libsqlite3.so.0
225 %{_mandir}/man1/sqlite3.1*
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libsqlite3.so
230 %{_libdir}/libsqlite3.la
231 %{_includedir}/sqlite3.h
232 %{_includedir}/sqlite3ext.h
233 %{_pkgconfigdir}/sqlite3.pc
236 %defattr(644,root,root,755)
237 %{_libdir}/libsqlite3.a
240 %files -n tcl-%{name}
241 %defattr(644,root,root,755)
242 %dir %{_libdir}/tcl*/sqlite3
243 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
244 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl