]>
Commit | Line | Data |
---|---|---|
c743401f | 1 | # TODO: |
f1015391 JR |
2 | # - some tests fail with tcl8.5, it's tcl fault, |
3 | # if someone REALLY cares (s)he can look into it | |
17b8c9f1 | 4 | # |
5 | # Conditional build: | |
d12e8042 | 6 | %bcond_with tests # run tests |
dd55e3fd | 7 | %bcond_without tcl # Tcl extension |
d12e8042 JB |
8 | %bcond_without doc # disable documentation building |
9 | %bcond_without unlock_notify # disable unlock notify API | |
60f66380 | 10 | %bcond_without load_extension # enable load extension API |
cd683928 | 11 | %bcond_with icu # ICU tokenizer support |
5df4522e | 12 | |
f1015391 JR |
13 | %ifarch alpha sparc %{x8664} |
14 | %undefine with_tests | |
15 | %endif | |
16 | ||
17 | # disabling tcl currently breaks making test target, | |
18 | # some hack in Makefile needs to be done | |
5df4522e | 19 | %if %{without tcl} |
f1015391 JR |
20 | %undefine with_tests |
21 | %endif | |
22 | ||
ef8f59d3 ER |
23 | %define ver %{lua:v="";for i in string.gmatch(string.format("%08d", %{vnum}), "..") do; v=v..i:gsub("^0", ".");end;v=v:gsub("^.","");print(v)} |
24 | %define vnum 3080803 | |
a8925d97 | 25 | %define tclver 8.6 |
17b8c9f1 | 26 | Summary: SQLite library |
e882a99f | 27 | Summary(pl.UTF-8): Biblioteka SQLite |
22ef5ab8 | 28 | Name: sqlite3 |
ef8f59d3 | 29 | Version: %{ver} |
cd683928 | 30 | Release: 1 |
dd55e3fd | 31 | License: Public Domain |
17b8c9f1 | 32 | Group: Libraries |
65cfa56f | 33 | # Source0Download: http://www.sqlite.org/download.html |
ef8f59d3 | 34 | Source0: http://www.sqlite.org/2015/sqlite-src-%{vnum}.zip |
83befcd8 | 35 | # Source0-md5: 7aed8084e18c2677c71345cbd8ca0b76 |
a3d8a32d | 36 | Patch0: %{name}-sign-function.patch |
65cfa56f | 37 | URL: http://www.sqlite.org/ |
d70f95dc | 38 | %{?with_load_extension:Provides: %{name}(load_extension)} |
39 | %{?with_unlock_notify:Provides: %{name}(unlock_notify)} | |
e0fdf246 | 40 | %{?with_icu:Provides: %{name}(icu)} |
dd55e3fd | 41 | BuildRequires: autoconf >= 2.50 |
17b8c9f1 | 42 | BuildRequires: automake |
43 | BuildRequires: libtool | |
44 | BuildRequires: readline-devel | |
6ca4ac16 | 45 | %{?with_load_extension:BuildRequires: sed >= 4.0} |
0e44e992 | 46 | BuildRequires: tcl |
a8925d97 | 47 | %{?with_tcl:BuildRequires: tcl-devel >= %{tclver}} |
086e11d9 | 48 | BuildRequires: unzip |
17b8c9f1 | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
9ff1c54d ER |
51 | %define _ulibdir /usr/lib |
52 | ||
17b8c9f1 | 53 | %description |
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 | |
64 | bindings for Tcl/Tk. | |
65 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 76 | bazami danych. |
77 | ||
78 | %package devel | |
79 | Summary: Header files for SQLite development | |
e882a99f | 80 | Summary(pl.UTF-8): Pliki nagłówkowe SQLite |
17b8c9f1 | 81 | Group: Development/Libraries |
82 | Requires: %{name} = %{version}-%{release} | |
d70f95dc | 83 | %if %{with unlock_notify} |
d70f95dc | 84 | Provides: %{name}-devel(unlock_notify) |
85 | %endif | |
86 | %if %{with load_extension} | |
d70f95dc | 87 | Provides: %{name}-devel(load_extension) |
88 | %endif | |
e0fdf246 ER |
89 | %if %{with icu} |
90 | Provides: %{name}-devel(icu) | |
91 | %endif | |
17b8c9f1 | 92 | |
93 | %description devel | |
94 | SQLite is a C library that implements an SQL database engine. A large | |
95 | subset of SQL92 is supported. A complete database is stored in a | |
96 | single disk file. The API is designed for convenience and ease of use. | |
97 | Applications that link against SQLite can enjoy the power and | |
98 | flexiblity of an SQL database without the administrative hassles of | |
99 | supporting a separate database server. Because it omits the | |
100 | client-server interaction overhead and writes directly to disk, SQLite | |
101 | is also faster than the big database servers for most operations. In | |
102 | addition to the C library, the SQLite distribution includes a | |
103 | command-line tool for interacting with SQLite databases and SQLite | |
104 | bindings for Tcl/Tk. | |
105 | ||
106 | This package contains the header files needed to develop programs that | |
107 | use these SQLite. | |
108 | ||
b7c0e1f2 JR |
109 | %description devel -l pl.UTF-8 |
110 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
111 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
112 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
113 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
114 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
115 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
116 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
117 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
118 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 119 | bazami danych. |
120 | ||
b7c0e1f2 JR |
121 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
122 | używających biblioteki SQLite. | |
17b8c9f1 | 123 | |
124 | %package static | |
125 | Summary: Static libraries for SQLite development | |
e882a99f | 126 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 127 | Group: Development/Libraries |
128 | Requires: %{name}-devel = %{version}-%{release} | |
d70f95dc | 129 | %if %{with unclock_notify} |
d70f95dc | 130 | Provides: %{name}-static(unlock_notify) |
131 | %endif | |
132 | %if %{with load_extension} | |
d70f95dc | 133 | Provides: %{name}-static(load_extension) |
134 | %endif | |
17b8c9f1 | 135 | |
136 | %description static | |
137 | SQLite is a C library that implements an SQL database engine. A large | |
138 | subset of SQL92 is supported. A complete database is stored in a | |
139 | single disk file. The API is designed for convenience and ease of use. | |
140 | Applications that link against SQLite can enjoy the power and | |
141 | flexiblity of an SQL database without the administrative hassles of | |
142 | supporting a separate database server. Because it omits the | |
143 | client-server interaction overhead and writes directly to disk, SQLite | |
144 | is also faster than the big database servers for most operations. In | |
145 | addition to the C library, the SQLite distribution includes a | |
146 | command-line tool for interacting with SQLite databases and SQLite | |
147 | bindings for Tcl/Tk. | |
148 | ||
149 | This package contains the static SQLite libraries. | |
150 | ||
b7c0e1f2 JR |
151 | %description static -l pl.UTF-8 |
152 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
153 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
154 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
155 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
156 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
157 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
158 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
159 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
160 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 161 | bazami danych. |
162 | ||
163 | Pakiet zawiera statyczne biblioteki SQLite. | |
164 | ||
c743401f | 165 | %package -n tcl-%{name} |
8e66772b | 166 | Summary: sqlite3 tcl extension |
e882a99f | 167 | Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl |
8e66772b | 168 | Group: Development/Languages/Tcl |
c743401f AM |
169 | |
170 | %description -n tcl-%{name} | |
171 | sqlite3 tcl extension. | |
172 | ||
b7c0e1f2 | 173 | %description -n tcl-%{name} -l pl.UTF-8 |
c743401f AM |
174 | Rozszerzenie sqlite3 dla Tcl. |
175 | ||
17b8c9f1 | 176 | %prep |
c883dce2 | 177 | %setup -q -n sqlite-src-%{version_num} |
30682d5a | 178 | %patch0 -p1 |
1cd2f537 | 179 | |
fc29cfbe | 180 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile.in |
faed6cf7 | 181 | |
78ed83ff AM |
182 | if [ "$(cat VERSION)" != "%{version}" ]; then |
183 | echo "Tarball content doesn't match version %{version}." >&2 | |
184 | exit 1 | |
185 | fi | |
186 | ||
17b8c9f1 | 187 | %build |
188 | %{__libtoolize} | |
189 | cp -f /usr/share/automake/config.sub . | |
190 | %{__aclocal} | |
191 | %{__autoconf} | |
fc29cfbe ER |
192 | append-cppflags() { |
193 | CPPFLAGS="$CPPFLAGS $*" | |
194 | } | |
195 | append-libs() { | |
196 | LIBS="$LIBS $*" | |
197 | } | |
198 | export CPPFLAGS="%{rpmcflags}" | |
199 | export LIBS | |
87af9815 MB |
200 | %if %{with tcl} |
201 | export TCLLIBDIR="%{tcl_sitearch}/sqlite3" | |
202 | %endif | |
e0fdf246 | 203 | |
fc29cfbe ER |
204 | append-cppflags -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE |
205 | ||
206 | # Support column metadata functions. | |
207 | # http://sqlite.org/c3ref/column_database_name.html | |
208 | # http://sqlite.org/c3ref/table_column_metadata.html | |
209 | append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA | |
210 | ||
211 | # Support Full-Text Search versions 3 and 4. | |
212 | # http://sqlite.org/fts3.html | |
213 | #append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61 | |
214 | append-cppflags -DSQLITE_ENABLE_FTS3 | |
215 | ||
216 | # Support R*Trees. | |
217 | # http://sqlite.org/rtree.html | |
218 | append-cppflags -DSQLITE_ENABLE_RTREE | |
219 | ||
220 | # Support soundex() function. | |
221 | # http://sqlite.org/lang_corefunc.html#soundex | |
222 | #append-cppflags -DSQLITE_SOUNDEX | |
223 | ||
224 | %if %{with unlock_notify} | |
225 | # Support unlock notification. | |
226 | # http://sqlite.org/unlock_notify.html | |
227 | append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY | |
228 | %endif | |
229 | ||
230 | %if %{with icu} | |
231 | append-cppflags -DSQLITE_ENABLE_ICU | |
232 | append-libs "-licui18n -licuuc" | |
233 | %endif | |
234 | ||
235 | %if %{with load_extension} | |
236 | append-libs "-ldl" | |
237 | %endif | |
238 | ||
17b8c9f1 | 239 | %configure \ |
e0fdf246 | 240 | %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \ |
60f66380 | 241 | %{__enable_disable load_extension load-extension} \ |
17b8c9f1 | 242 | --enable-threadsafe |
60f66380 | 243 | |
5df4522e | 244 | %{__make} |
1a6aae8d | 245 | |
e16bc4b1 | 246 | %if %{with doc} |
17b8c9f1 | 247 | %{__make} doc |
1a6aae8d | 248 | %endif |
17b8c9f1 | 249 | |
3e5df83c | 250 | %{?with_tests:LC_ALL=C %{__make} test} |
17b8c9f1 | 251 | |
252 | %install | |
253 | rm -rf $RPM_BUILD_ROOT | |
1c91d9d5 | 254 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1} |
17b8c9f1 | 255 | %{__make} install \ |
dd55e3fd | 256 | DESTDIR=$RPM_BUILD_ROOT |
ec30f86a | 257 | |
1c91d9d5 | 258 | mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} |
dd55e3fd | 259 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so |
1c91d9d5 JR |
260 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \ |
261 | $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so | |
262 | ||
e0fdf246 | 263 | cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
17b8c9f1 | 264 | |
265 | %clean | |
266 | rm -rf $RPM_BUILD_ROOT | |
267 | ||
268 | %post -p /sbin/ldconfig | |
269 | %postun -p /sbin/ldconfig | |
270 | ||
271 | %files | |
272 | %defattr(644,root,root,755) | |
a8925d97 | 273 | %doc README.md |
17b8c9f1 | 274 | %attr(755,root,root) %{_bindir}/sqlite3 |
1c91d9d5 JR |
275 | %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.* |
276 | %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0 | |
c743401f | 277 | %{_mandir}/man1/sqlite3.1* |
17b8c9f1 | 278 | |
279 | %files devel | |
280 | %defattr(644,root,root,755) | |
7e92c022 JB |
281 | %attr(755,root,root) %{_libdir}/libsqlite3.so |
282 | %{_libdir}/libsqlite3.la | |
17b8c9f1 | 283 | %{_includedir}/sqlite3.h |
ef88c71c | 284 | %{_includedir}/sqlite3ext.h |
7e92c022 | 285 | %{_pkgconfigdir}/sqlite3.pc |
17b8c9f1 | 286 | |
287 | %files static | |
288 | %defattr(644,root,root,755) | |
7e92c022 | 289 | %{_libdir}/libsqlite3.a |
c743401f | 290 | |
1a6aae8d | 291 | %if %{with tcl} |
c743401f AM |
292 | %files -n tcl-%{name} |
293 | %defattr(644,root,root,755) | |
80deaf18 | 294 | %dir %{_libdir}/tcl*/sqlite3 |
7e92c022 JB |
295 | %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so |
296 | %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl | |
1a6aae8d | 297 | %endif |