2 # - some tests fail with tcl8.5, it's tcl fault,
3 # if someone REALLY cares (s)he can look into it
4 # - enable --enable-load-extension?
7 %bcond_with tests # run tests
8 %bcond_with tcl # enable tcl extension
9 %bcond_without doc # disable documentation building
10 %bcond_without unlock_notify # enable unlock notify api
11 %bcond_with load_extension # enable load extension api
13 %ifarch alpha sparc %{x8664}
17 # disabling tcl currently breaks making test target,
18 # some hack in Makefile needs to be done
23 %define realver 3070500
25 %define rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g")
26 %define _ulibdir /usr/lib
29 Summary: SQLite library
30 Summary(pl.UTF-8): Biblioteka SQLite
36 # Source0Download: http://www.sqlite.org/download.html
37 Source0: http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip
38 # Source0-md5: d61d784997d42cd0d92bac7994094c56
39 Patch0: %{name}-sign-function.patch
40 URL: http://www.sqlite.org/
41 BuildRequires: autoconf
42 BuildRequires: automake
43 BuildRequires: libtool
44 BuildRequires: readline-devel
45 %{?with_load_extension:BuildRequires: sed >= 4.0}
47 %{?with_tcl:BuildRequires: tcl-devel}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 SQLite is a C library that implements an SQL database engine. A large
53 subset of SQL92 is supported. A complete database is stored in a
54 single disk file. The API is designed for convenience and ease of use.
55 Applications that link against SQLite can enjoy the power and
56 flexiblity of an SQL database without the administrative hassles of
57 supporting a separate database server. Because it omits the
58 client-server interaction overhead and writes directly to disk, SQLite
59 is also faster than the big database servers for most operations. In
60 addition to the C library, the SQLite distribution includes a
61 command-line tool for interacting with SQLite databases and SQLite
64 %description -l pl.UTF-8
65 SQLite jest biblioteką języka C, która implementuje silnik baz danych
66 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
67 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
68 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
69 danych bez konieczności utrzymywania osobnego serwera baz danych.
70 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
71 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
72 bazodanowych przy większości operacji na bazie danych. Dodatkowo
73 oprócz biblioteki języka C, dostarczany jest program do zarządzania
77 Summary: Header files for SQLite development
78 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
79 Group: Development/Libraries
80 Requires: %{name} = %{version}-%{release}
83 SQLite is a C library that implements an SQL database engine. A large
84 subset of SQL92 is supported. A complete database is stored in a
85 single disk file. The API is designed for convenience and ease of use.
86 Applications that link against SQLite can enjoy the power and
87 flexiblity of an SQL database without the administrative hassles of
88 supporting a separate database server. Because it omits the
89 client-server interaction overhead and writes directly to disk, SQLite
90 is also faster than the big database servers for most operations. In
91 addition to the C library, the SQLite distribution includes a
92 command-line tool for interacting with SQLite databases and SQLite
95 This package contains the header files needed to develop programs that
98 %description devel -l pl.UTF-8
99 SQLite jest biblioteką języka C, która implementuje silnik baz danych
100 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
101 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
102 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
103 danych bez konieczności utrzymywania osobnego serwera baz danych.
104 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
105 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
106 bazodanowych przy większości operacji na bazie danych. Dodatkowo
107 oprócz biblioteki języka C, dostarczany jest program do zarządzania
110 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
111 używających biblioteki SQLite.
114 Summary: Static libraries for SQLite development
115 Summary(pl.UTF-8): Statyczne biblioteki SQLite
116 Group: Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
120 SQLite is a C library that implements an SQL database engine. A large
121 subset of SQL92 is supported. A complete database is stored in a
122 single disk file. The API is designed for convenience and ease of use.
123 Applications that link against SQLite can enjoy the power and
124 flexiblity of an SQL database without the administrative hassles of
125 supporting a separate database server. Because it omits the
126 client-server interaction overhead and writes directly to disk, SQLite
127 is also faster than the big database servers for most operations. In
128 addition to the C library, the SQLite distribution includes a
129 command-line tool for interacting with SQLite databases and SQLite
132 This package contains the static SQLite libraries.
134 %description static -l pl.UTF-8
135 SQLite jest biblioteką języka C, która implementuje silnik baz danych
136 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
137 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
138 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
139 danych bez konieczności utrzymywania osobnego serwera baz danych.
140 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
141 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
142 bazodanowych przy większości operacji na bazie danych. Dodatkowo
143 oprócz biblioteki języka C, dostarczany jest program do zarządzania
146 Pakiet zawiera statyczne biblioteki SQLite.
148 %package -n tcl-%{name}
149 Summary: sqlite3 tcl extension
150 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
151 Group: Development/Languages/Tcl
153 %description -n tcl-%{name}
154 sqlite3 tcl extension.
156 %description -n tcl-%{name} -l pl.UTF-8
157 Rozszerzenie sqlite3 dla Tcl.
160 %setup -q -n sqlite-%{srcver}-%{realver}
163 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
167 cp -f /usr/share/automake/config.sub .
170 CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE %{?with_unlock_notify:-DSQLITE_ENABLE_UNLOCK_NOTIFY}"
172 %if %{with load_extension}
177 %{?with_tcl:--with-tcl=%{_ulibdir}} \
178 %{!?with_tcl:--disable-tcl} \
180 %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
187 %{?with_tests:LC_ALL=C %{__make} test}
190 rm -rf $RPM_BUILD_ROOT
191 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
194 DESTDIR=$RPM_BUILD_ROOT \
195 TCLLIBDIR=%{_libdir}/tcl%{tclver}
198 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
201 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
202 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.so
203 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
204 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
206 cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
209 rm -rf $RPM_BUILD_ROOT
211 %post -p /sbin/ldconfig
212 %postun -p /sbin/ldconfig
215 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_bindir}/sqlite3
218 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
219 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
220 %{_mandir}/man1/sqlite3.1*
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libsqlite3.so
225 %{_libdir}/libsqlite3.la
226 %{_includedir}/sqlite3.h
227 %{_includedir}/sqlite3ext.h
228 %{_pkgconfigdir}/sqlite3.pc
231 %defattr(644,root,root,755)
232 %{_libdir}/libsqlite3.a
235 %files -n tcl-%{name}
236 %defattr(644,root,root,755)
237 %dir %{_libdir}/tcl*/sqlite3
238 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
239 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl