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_without tcl # Tcl extension
9 %bcond_without doc # disable documentation building
10 %bcond_without unlock_notify # disable 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 version_num %(echo %{version} | awk -F. '{printf("%d%02d%02d%02d", $1, $2, $3, $4)}')
24 %define _ulibdir /usr/lib
27 Summary: SQLite library
28 Summary(pl.UTF-8): Biblioteka SQLite
32 License: Public Domain
34 # Source0Download: http://www.sqlite.org/download.html
35 Source0: http://www.sqlite.org/sqlite-src-%{version_num}.zip
36 # Source0-md5: 13bb3eaae94592ef3220ea23582763f5
37 Patch0: %{name}-sign-function.patch
38 URL: http://www.sqlite.org/
39 %{?with_load_extension:Provides: %{name}(load_extension)}
40 %{?with_unlock_notify:Provides: %{name}(unlock_notify)}
41 BuildRequires: autoconf >= 2.50
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}
81 %if %{with unlock_notify}
82 Requires: %{name}(unlock_notify)
83 Provides: %{name}-devel(unlock_notify)
85 %if %{with load_extension}
86 Requires: %{name}(load_extension)
87 Provides: %{name}-devel(load_extension)
91 SQLite is a C library that implements an SQL database engine. A large
92 subset of SQL92 is supported. A complete database is stored in a
93 single disk file. The API is designed for convenience and ease of use.
94 Applications that link against SQLite can enjoy the power and
95 flexiblity of an SQL database without the administrative hassles of
96 supporting a separate database server. Because it omits the
97 client-server interaction overhead and writes directly to disk, SQLite
98 is also faster than the big database servers for most operations. In
99 addition to the C library, the SQLite distribution includes a
100 command-line tool for interacting with SQLite databases and SQLite
103 This package contains the header files needed to develop programs that
106 %description devel -l pl.UTF-8
107 SQLite jest biblioteką języka C, która implementuje silnik baz danych
108 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
109 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
110 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
111 danych bez konieczności utrzymywania osobnego serwera baz danych.
112 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
113 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
114 bazodanowych przy większości operacji na bazie danych. Dodatkowo
115 oprócz biblioteki języka C, dostarczany jest program do zarządzania
118 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
119 używających biblioteki SQLite.
122 Summary: Static libraries for SQLite development
123 Summary(pl.UTF-8): Statyczne biblioteki SQLite
124 Group: Development/Libraries
125 Requires: %{name}-devel = %{version}-%{release}
126 %if %{with unclock_notify}
127 Requires: %{name}-devel(unlock_notify)
128 Provides: %{name}-static(unlock_notify)
130 %if %{with load_extension}
131 Requires: %{name}-devel(load_extension)
132 Provides: %{name}-static(load_extension)
136 SQLite is a C library that implements an SQL database engine. A large
137 subset of SQL92 is supported. A complete database is stored in a
138 single disk file. The API is designed for convenience and ease of use.
139 Applications that link against SQLite can enjoy the power and
140 flexiblity of an SQL database without the administrative hassles of
141 supporting a separate database server. Because it omits the
142 client-server interaction overhead and writes directly to disk, SQLite
143 is also faster than the big database servers for most operations. In
144 addition to the C library, the SQLite distribution includes a
145 command-line tool for interacting with SQLite databases and SQLite
148 This package contains the static SQLite libraries.
150 %description static -l pl.UTF-8
151 SQLite jest biblioteką języka C, która implementuje silnik baz danych
152 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
153 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
154 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
155 danych bez konieczności utrzymywania osobnego serwera baz danych.
156 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
157 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
158 bazodanowych przy większości operacji na bazie danych. Dodatkowo
159 oprócz biblioteki języka C, dostarczany jest program do zarządzania
162 Pakiet zawiera statyczne biblioteki SQLite.
164 %package -n tcl-%{name}
165 Summary: sqlite3 tcl extension
166 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
167 Group: Development/Languages/Tcl
169 %description -n tcl-%{name}
170 sqlite3 tcl extension.
172 %description -n tcl-%{name} -l pl.UTF-8
173 Rozszerzenie sqlite3 dla Tcl.
176 %setup -q -n sqlite-src-%{version_num}
179 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
183 cp -f /usr/share/automake/config.sub .
186 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}"
188 %if %{with load_extension}
193 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
196 %{?with_tcl:--with-tcl=%{_ulibdir}} \
197 %{!?with_tcl:--disable-tcl} \
199 %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
206 %{?with_tests:LC_ALL=C %{__make} test}
209 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
213 DESTDIR=$RPM_BUILD_ROOT
215 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
216 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
217 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
218 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
220 cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
223 rm -rf $RPM_BUILD_ROOT
225 %post -p /sbin/ldconfig
226 %postun -p /sbin/ldconfig
229 %defattr(644,root,root,755)
231 %attr(755,root,root) %{_bindir}/sqlite3
232 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
233 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
234 %{_mandir}/man1/sqlite3.1*
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/libsqlite3.so
239 %{_libdir}/libsqlite3.la
240 %{_includedir}/sqlite3.h
241 %{_includedir}/sqlite3ext.h
242 %{_pkgconfigdir}/sqlite3.pc
245 %defattr(644,root,root,755)
246 %{_libdir}/libsqlite3.a
249 %files -n tcl-%{name}
250 %defattr(644,root,root,755)
251 %dir %{_libdir}/tcl*/sqlite3
252 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
253 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl