]>
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 | |
65cfa56f ER |
4 | # - alpha build fail: |
5 | # tclsh ./tool/mksqlite3c.tcl | |
6 | # tclsh: allocatestack.c:404: allocate_stack: Assertion `size != 0' failed. | |
7 | # make: *** [sqlite3.c] Aborted | |
8ef92c1a | 8 | # - enable --enable-load-extension? |
17b8c9f1 | 9 | # |
10 | # Conditional build: | |
f1015391 | 11 | %bcond_with tests # run tests |
158e8e57 | 12 | %bcond_with tcl # enable tcl extension |
f1015391 | 13 | %bcond_without doc # disable documentation building |
17b8c9f1 | 14 | # |
f1015391 JR |
15 | %ifarch alpha sparc %{x8664} |
16 | %undefine with_tests | |
17 | %endif | |
18 | ||
19 | # disabling tcl currently breaks making test target, | |
20 | # some hack in Makefile needs to be done | |
21 | %if !%{with tcl} | |
22 | %undefine with_tests | |
23 | %endif | |
24 | ||
65cfa56f | 25 | %define _ulibdir /usr/lib |
539069d8 | 26 | %define tclver 8.5 |
f1015391 | 27 | |
17b8c9f1 | 28 | Summary: SQLite library |
e882a99f | 29 | Summary(pl.UTF-8): Biblioteka SQLite |
22ef5ab8 | 30 | Name: sqlite3 |
23e9b9f0 | 31 | Version: 3.6.20 |
23d44151 | 32 | Release: 3 |
17b8c9f1 | 33 | License: LGPL |
34 | Group: Libraries | |
65cfa56f ER |
35 | # Source0Download: http://www.sqlite.org/download.html |
36 | Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz | |
23e9b9f0 | 37 | # Source0-md5: 0faf8fc8ccff5297513c6532b2b4ce23 |
a3d8a32d | 38 | Patch0: %{name}-sign-function.patch |
65cfa56f | 39 | URL: http://www.sqlite.org/ |
17b8c9f1 | 40 | BuildRequires: autoconf |
41 | BuildRequires: automake | |
42 | BuildRequires: libtool | |
43 | BuildRequires: readline-devel | |
0e44e992 | 44 | BuildRequires: tcl |
1a6aae8d | 45 | %{?with_tcl:BuildRequires: tcl-devel} |
17b8c9f1 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
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 | |
59 | bindings for Tcl/Tk. | |
60 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 71 | bazami danych. |
72 | ||
73 | %package devel | |
74 | Summary: Header files for SQLite development | |
e882a99f | 75 | Summary(pl.UTF-8): Pliki nagłówkowe SQLite |
17b8c9f1 | 76 | Group: Development/Libraries |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description devel | |
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 | |
90 | bindings for Tcl/Tk. | |
91 | ||
92 | This package contains the header files needed to develop programs that | |
93 | use these SQLite. | |
94 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 105 | bazami danych. |
106 | ||
b7c0e1f2 JR |
107 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
108 | używających biblioteki SQLite. | |
17b8c9f1 | 109 | |
110 | %package static | |
111 | Summary: Static libraries for SQLite development | |
e882a99f | 112 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 113 | Group: Development/Libraries |
114 | Requires: %{name}-devel = %{version}-%{release} | |
115 | ||
116 | %description static | |
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 | |
127 | bindings for Tcl/Tk. | |
128 | ||
129 | This package contains the static SQLite libraries. | |
130 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 141 | bazami danych. |
142 | ||
143 | Pakiet zawiera statyczne biblioteki SQLite. | |
144 | ||
c743401f | 145 | %package -n tcl-%{name} |
8e66772b | 146 | Summary: sqlite3 tcl extension |
e882a99f | 147 | Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl |
8e66772b | 148 | Group: Development/Languages/Tcl |
c743401f AM |
149 | |
150 | %description -n tcl-%{name} | |
151 | sqlite3 tcl extension. | |
152 | ||
b7c0e1f2 | 153 | %description -n tcl-%{name} -l pl.UTF-8 |
c743401f AM |
154 | Rozszerzenie sqlite3 dla Tcl. |
155 | ||
17b8c9f1 | 156 | %prep |
c743401f | 157 | %setup -q -n sqlite-%{version} |
30682d5a | 158 | %patch0 -p1 |
1cd2f537 | 159 | |
faed6cf7 ER |
160 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile* |
161 | ||
162 | %ifarch alpha | |
163 | # See also LP#276821 | |
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 | |
167 | #!/bin/sh | |
168 | ulimit -s 8192 | |
169 | exec tclsh "$@" | |
170 | EOF | |
171 | chmod +x tclsh.sh | |
172 | %endif | |
17b8c9f1 | 173 | |
174 | %build | |
175 | %{__libtoolize} | |
176 | cp -f /usr/share/automake/config.sub . | |
177 | %{__aclocal} | |
178 | %{__autoconf} | |
c7a7c162 | 179 | CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1" |
f1015391 | 180 | export CFLAGS |
17b8c9f1 | 181 | %configure \ |
1a6aae8d | 182 | %{?with_tcl:--with-tcl=%{_ulibdir}} \ |
183 | %{!?with_tcl:--disable-tcl} \ | |
17b8c9f1 | 184 | --enable-threadsafe |
faed6cf7 ER |
185 | %{__make} \ |
186 | %ifarch alpha | |
187 | TCLSH_CMD=./tclsh.sh | |
188 | %endif | |
1a6aae8d | 189 | |
e16bc4b1 | 190 | %if %{with doc} |
17b8c9f1 | 191 | %{__make} doc |
1a6aae8d | 192 | %endif |
17b8c9f1 | 193 | |
3e5df83c | 194 | %{?with_tests:LC_ALL=C %{__make} test} |
17b8c9f1 | 195 | |
196 | %install | |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1} | |
199 | ||
200 | %{__make} install \ | |
faed6cf7 ER |
201 | %ifarch alpha |
202 | TCLSH_CMD=./tclsh.sh \ | |
203 | %endif | |
80deaf18 JR |
204 | DESTDIR=$RPM_BUILD_ROOT \ |
205 | TCLLIBDIR=%{_libdir}/tcl%{tclver} | |
17b8c9f1 | 206 | |
22de4c1c | 207 | %if %{with tcl} |
7e92c022 | 208 | sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl |
22de4c1c | 209 | %endif |
ec30f86a | 210 | |
c743401f | 211 | install sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
17b8c9f1 | 212 | |
213 | %clean | |
214 | rm -rf $RPM_BUILD_ROOT | |
215 | ||
216 | %post -p /sbin/ldconfig | |
217 | %postun -p /sbin/ldconfig | |
218 | ||
219 | %files | |
220 | %defattr(644,root,root,755) | |
221 | %doc README | |
222 | %attr(755,root,root) %{_bindir}/sqlite3 | |
7e92c022 JB |
223 | %attr(755,root,root) %{_libdir}/libsqlite3.so.*.*.* |
224 | %attr(755,root,root) %ghost %{_libdir}/libsqlite3.so.0 | |
c743401f | 225 | %{_mandir}/man1/sqlite3.1* |
17b8c9f1 | 226 | |
227 | %files devel | |
228 | %defattr(644,root,root,755) | |
7e92c022 JB |
229 | %attr(755,root,root) %{_libdir}/libsqlite3.so |
230 | %{_libdir}/libsqlite3.la | |
17b8c9f1 | 231 | %{_includedir}/sqlite3.h |
ef88c71c | 232 | %{_includedir}/sqlite3ext.h |
7e92c022 | 233 | %{_pkgconfigdir}/sqlite3.pc |
17b8c9f1 | 234 | |
235 | %files static | |
236 | %defattr(644,root,root,755) | |
7e92c022 | 237 | %{_libdir}/libsqlite3.a |
c743401f | 238 | |
1a6aae8d | 239 | %if %{with tcl} |
c743401f AM |
240 | %files -n tcl-%{name} |
241 | %defattr(644,root,root,755) | |
80deaf18 | 242 | %dir %{_libdir}/tcl*/sqlite3 |
7e92c022 JB |
243 | %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so |
244 | %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl | |
1a6aae8d | 245 | %endif |