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 realver 3070900
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
34 License: Public Domain
36 # Source0Download: http://www.sqlite.org/download.html
37 Source0: http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip
38 # Source0-md5: b2646c5a0c0b5bc6b8f0b67fc318bab3
39 Patch0: %{name}-sign-function.patch
40 URL: http://www.sqlite.org/
41 %{?with_load_extension:Provides: %{name}(load_extension)}
42 %{?with_unlock_notify:Provides: %{name}(unlock_notify)}
43 BuildRequires: autoconf >= 2.50
44 BuildRequires: automake
45 BuildRequires: libtool
46 BuildRequires: readline-devel
47 %{?with_load_extension:BuildRequires: sed >= 4.0}
49 %{?with_tcl:BuildRequires: tcl-devel}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 SQLite is a C library that implements an SQL database engine. A large
55 subset of SQL92 is supported. A complete database is stored in a
56 single disk file. The API is designed for convenience and ease of use.
57 Applications that link against SQLite can enjoy the power and
58 flexiblity of an SQL database without the administrative hassles of
59 supporting a separate database server. Because it omits the
60 client-server interaction overhead and writes directly to disk, SQLite
61 is also faster than the big database servers for most operations. In
62 addition to the C library, the SQLite distribution includes a
63 command-line tool for interacting with SQLite databases and SQLite
66 %description -l pl.UTF-8
67 SQLite jest biblioteką języka C, która implementuje silnik baz danych
68 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
69 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
70 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
71 danych bez konieczności utrzymywania osobnego serwera baz danych.
72 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
73 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
74 bazodanowych przy większości operacji na bazie danych. Dodatkowo
75 oprócz biblioteki języka C, dostarczany jest program do zarządzania
79 Summary: Header files for SQLite development
80 Summary(pl.UTF-8): Pliki nagłówkowe SQLite
81 Group: Development/Libraries
82 Requires: %{name} = %{version}-%{release}
83 %if %{with unlock_notify}
84 Requires: %{name}(unlock_notify)
85 Provides: %{name}-devel(unlock_notify)
87 %if %{with load_extension}
88 Requires: %{name}(load_extension)
89 Provides: %{name}-devel(load_extension)
93 SQLite is a C library that implements an SQL database engine. A large
94 subset of SQL92 is supported. A complete database is stored in a
95 single disk file. The API is designed for convenience and ease of use.
96 Applications that link against SQLite can enjoy the power and
97 flexiblity of an SQL database without the administrative hassles of
98 supporting a separate database server. Because it omits the
99 client-server interaction overhead and writes directly to disk, SQLite
100 is also faster than the big database servers for most operations. In
101 addition to the C library, the SQLite distribution includes a
102 command-line tool for interacting with SQLite databases and SQLite
105 This package contains the header files needed to develop programs that
108 %description devel -l pl.UTF-8
109 SQLite jest biblioteką języka C, która implementuje silnik baz danych
110 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
111 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
112 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
113 danych bez konieczności utrzymywania osobnego serwera baz danych.
114 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
115 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
116 bazodanowych przy większości operacji na bazie danych. Dodatkowo
117 oprócz biblioteki języka C, dostarczany jest program do zarządzania
120 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
121 używających biblioteki SQLite.
124 Summary: Static libraries for SQLite development
125 Summary(pl.UTF-8): Statyczne biblioteki SQLite
126 Group: Development/Libraries
127 Requires: %{name}-devel = %{version}-%{release}
128 %if %{with unclock_notify}
129 Requires: %{name}-devel(unlock_notify)
130 Provides: %{name}-static(unlock_notify)
132 %if %{with load_extension}
133 Requires: %{name}-devel(load_extension)
134 Provides: %{name}-static(load_extension)
138 SQLite is a C library that implements an SQL database engine. A large
139 subset of SQL92 is supported. A complete database is stored in a
140 single disk file. The API is designed for convenience and ease of use.
141 Applications that link against SQLite can enjoy the power and
142 flexiblity of an SQL database without the administrative hassles of
143 supporting a separate database server. Because it omits the
144 client-server interaction overhead and writes directly to disk, SQLite
145 is also faster than the big database servers for most operations. In
146 addition to the C library, the SQLite distribution includes a
147 command-line tool for interacting with SQLite databases and SQLite
150 This package contains the static SQLite libraries.
152 %description static -l pl.UTF-8
153 SQLite jest biblioteką języka C, która implementuje silnik baz danych
154 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
155 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
156 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
157 danych bez konieczności utrzymywania osobnego serwera baz danych.
158 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
159 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
160 bazodanowych przy większości operacji na bazie danych. Dodatkowo
161 oprócz biblioteki języka C, dostarczany jest program do zarządzania
164 Pakiet zawiera statyczne biblioteki SQLite.
166 %package -n tcl-%{name}
167 Summary: sqlite3 tcl extension
168 Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl
169 Group: Development/Languages/Tcl
171 %description -n tcl-%{name}
172 sqlite3 tcl extension.
174 %description -n tcl-%{name} -l pl.UTF-8
175 Rozszerzenie sqlite3 dla Tcl.
178 %setup -q -n sqlite-%{srcver}-%{realver}
181 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
185 cp -f /usr/share/automake/config.sub .
188 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}"
190 %if %{with load_extension}
195 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
198 %{?with_tcl:--with-tcl=%{_ulibdir}} \
199 %{!?with_tcl:--disable-tcl} \
201 %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
208 %{?with_tests:LC_ALL=C %{__make} test}
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
215 DESTDIR=$RPM_BUILD_ROOT
217 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
218 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
219 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
220 $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
222 cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
225 rm -rf $RPM_BUILD_ROOT
227 %post -p /sbin/ldconfig
228 %postun -p /sbin/ldconfig
231 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_bindir}/sqlite3
234 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
235 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
236 %{_mandir}/man1/sqlite3.1*
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libsqlite3.so
241 %{_libdir}/libsqlite3.la
242 %{_includedir}/sqlite3.h
243 %{_includedir}/sqlite3ext.h
244 %{_pkgconfigdir}/sqlite3.pc
247 %defattr(644,root,root,755)
248 %{_libdir}/libsqlite3.a
251 %files -n tcl-%{name}
252 %defattr(644,root,root,755)
253 %dir %{_libdir}/tcl*/sqlite3
254 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
255 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl