]>
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 | |
17b8c9f1 | 8 | # |
9 | # Conditional build: | |
f1015391 JR |
10 | %bcond_with tests # run tests |
11 | %bcond_without tcl # disable tcl extension | |
12 | %bcond_without doc # disable documentation building | |
17b8c9f1 | 13 | # |
f1015391 JR |
14 | %ifarch alpha sparc %{x8664} |
15 | %undefine with_tests | |
16 | %endif | |
17 | ||
18 | # disabling tcl currently breaks making test target, | |
19 | # some hack in Makefile needs to be done | |
20 | %if !%{with tcl} | |
21 | %undefine with_tests | |
22 | %endif | |
23 | ||
65cfa56f | 24 | %define _ulibdir /usr/lib |
539069d8 | 25 | %define tclver 8.5 |
f1015391 | 26 | |
17b8c9f1 | 27 | Summary: SQLite library |
e882a99f | 28 | Summary(pl.UTF-8): Biblioteka SQLite |
22ef5ab8 | 29 | Name: sqlite3 |
dbff3c9b | 30 | Version: 3.6.10 |
64a2b8e8 | 31 | Release: 1 |
17b8c9f1 | 32 | License: LGPL |
33 | Group: Libraries | |
65cfa56f ER |
34 | # Source0Download: http://www.sqlite.org/download.html |
35 | Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz | |
dbff3c9b | 36 | # Source0-md5: a03bdc86df4025b6881d58557e4b5bd3 |
a3d8a32d | 37 | Patch0: %{name}-sign-function.patch |
65cfa56f | 38 | URL: http://www.sqlite.org/ |
17b8c9f1 | 39 | BuildRequires: autoconf |
40 | BuildRequires: automake | |
41 | BuildRequires: libtool | |
42 | BuildRequires: readline-devel | |
1a6aae8d | 43 | %{?with_tcl:BuildRequires: tcl-devel} |
17b8c9f1 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
47 | SQLite is a C library that implements an SQL database engine. A large | |
48 | subset of SQL92 is supported. A complete database is stored in a | |
49 | single disk file. The API is designed for convenience and ease of use. | |
50 | Applications that link against SQLite can enjoy the power and | |
51 | flexiblity of an SQL database without the administrative hassles of | |
52 | supporting a separate database server. Because it omits the | |
53 | client-server interaction overhead and writes directly to disk, SQLite | |
54 | is also faster than the big database servers for most operations. In | |
55 | addition to the C library, the SQLite distribution includes a | |
56 | command-line tool for interacting with SQLite databases and SQLite | |
57 | bindings for Tcl/Tk. | |
58 | ||
b7c0e1f2 JR |
59 | %description -l pl.UTF-8 |
60 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
61 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
62 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
63 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
64 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
65 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
66 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
67 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
68 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 69 | bazami danych. |
70 | ||
71 | %package devel | |
72 | Summary: Header files for SQLite development | |
e882a99f | 73 | Summary(pl.UTF-8): Pliki nagłówkowe SQLite |
17b8c9f1 | 74 | Group: Development/Libraries |
75 | Requires: %{name} = %{version}-%{release} | |
76 | ||
77 | %description devel | |
78 | SQLite is a C library that implements an SQL database engine. A large | |
79 | subset of SQL92 is supported. A complete database is stored in a | |
80 | single disk file. The API is designed for convenience and ease of use. | |
81 | Applications that link against SQLite can enjoy the power and | |
82 | flexiblity of an SQL database without the administrative hassles of | |
83 | supporting a separate database server. Because it omits the | |
84 | client-server interaction overhead and writes directly to disk, SQLite | |
85 | is also faster than the big database servers for most operations. In | |
86 | addition to the C library, the SQLite distribution includes a | |
87 | command-line tool for interacting with SQLite databases and SQLite | |
88 | bindings for Tcl/Tk. | |
89 | ||
90 | This package contains the header files needed to develop programs that | |
91 | use these SQLite. | |
92 | ||
b7c0e1f2 JR |
93 | %description devel -l pl.UTF-8 |
94 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
95 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
96 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
97 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
98 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
99 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
100 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
101 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
102 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 103 | bazami danych. |
104 | ||
b7c0e1f2 JR |
105 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
106 | używających biblioteki SQLite. | |
17b8c9f1 | 107 | |
108 | %package static | |
109 | Summary: Static libraries for SQLite development | |
e882a99f | 110 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 111 | Group: Development/Libraries |
112 | Requires: %{name}-devel = %{version}-%{release} | |
113 | ||
114 | %description static | |
115 | SQLite is a C library that implements an SQL database engine. A large | |
116 | subset of SQL92 is supported. A complete database is stored in a | |
117 | single disk file. The API is designed for convenience and ease of use. | |
118 | Applications that link against SQLite can enjoy the power and | |
119 | flexiblity of an SQL database without the administrative hassles of | |
120 | supporting a separate database server. Because it omits the | |
121 | client-server interaction overhead and writes directly to disk, SQLite | |
122 | is also faster than the big database servers for most operations. In | |
123 | addition to the C library, the SQLite distribution includes a | |
124 | command-line tool for interacting with SQLite databases and SQLite | |
125 | bindings for Tcl/Tk. | |
126 | ||
127 | This package contains the static SQLite libraries. | |
128 | ||
b7c0e1f2 JR |
129 | %description static -l pl.UTF-8 |
130 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
131 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
132 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
133 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
134 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
135 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
136 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
137 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
138 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 139 | bazami danych. |
140 | ||
141 | Pakiet zawiera statyczne biblioteki SQLite. | |
142 | ||
c743401f | 143 | %package -n tcl-%{name} |
8e66772b | 144 | Summary: sqlite3 tcl extension |
e882a99f | 145 | Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl |
8e66772b | 146 | Group: Development/Languages/Tcl |
c743401f AM |
147 | |
148 | %description -n tcl-%{name} | |
149 | sqlite3 tcl extension. | |
150 | ||
b7c0e1f2 | 151 | %description -n tcl-%{name} -l pl.UTF-8 |
c743401f AM |
152 | Rozszerzenie sqlite3 dla Tcl. |
153 | ||
17b8c9f1 | 154 | %prep |
c743401f | 155 | %setup -q -n sqlite-%{version} |
30682d5a | 156 | %patch0 -p1 |
1cd2f537 | 157 | |
faed6cf7 ER |
158 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile* |
159 | ||
160 | %ifarch alpha | |
161 | # See also LP#276821 | |
162 | # wrapper script to reset stack to 8192 as if ran from make it's insanely huge!: | |
163 | # stack(kbytes) 18014398509481983 | |
164 | cat <<'EOF' > tclsh.sh | |
165 | #!/bin/sh | |
166 | ulimit -s 8192 | |
167 | exec tclsh "$@" | |
168 | EOF | |
169 | chmod +x tclsh.sh | |
170 | %endif | |
17b8c9f1 | 171 | |
172 | %build | |
173 | %{__libtoolize} | |
174 | cp -f /usr/share/automake/config.sub . | |
175 | %{__aclocal} | |
176 | %{__autoconf} | |
f1015391 JR |
177 | CFLAGS="%{rpmcflags} -DSQLITE_ENABLE_COLUMN_METADATA=1" |
178 | export CFLAGS | |
17b8c9f1 | 179 | %configure \ |
1a6aae8d | 180 | %{?with_tcl:--with-tcl=%{_ulibdir}} \ |
181 | %{!?with_tcl:--disable-tcl} \ | |
17b8c9f1 | 182 | --enable-threadsafe |
faed6cf7 ER |
183 | %{__make} \ |
184 | %ifarch alpha | |
185 | TCLSH_CMD=./tclsh.sh | |
186 | %endif | |
1a6aae8d | 187 | |
e16bc4b1 | 188 | %if %{with doc} |
17b8c9f1 | 189 | %{__make} doc |
1a6aae8d | 190 | %endif |
17b8c9f1 | 191 | |
3e5df83c | 192 | %{?with_tests:LC_ALL=C %{__make} test} |
17b8c9f1 | 193 | |
194 | %install | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1} | |
197 | ||
198 | %{__make} install \ | |
faed6cf7 ER |
199 | %ifarch alpha |
200 | TCLSH_CMD=./tclsh.sh \ | |
201 | %endif | |
80deaf18 JR |
202 | DESTDIR=$RPM_BUILD_ROOT \ |
203 | TCLLIBDIR=%{_libdir}/tcl%{tclver} | |
17b8c9f1 | 204 | |
22de4c1c | 205 | %if %{with tcl} |
7e92c022 | 206 | sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl |
22de4c1c | 207 | %endif |
ec30f86a | 208 | |
c743401f | 209 | install sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
17b8c9f1 | 210 | |
211 | %clean | |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
214 | %post -p /sbin/ldconfig | |
215 | %postun -p /sbin/ldconfig | |
216 | ||
217 | %files | |
218 | %defattr(644,root,root,755) | |
219 | %doc README | |
220 | %attr(755,root,root) %{_bindir}/sqlite3 | |
7e92c022 JB |
221 | %attr(755,root,root) %{_libdir}/libsqlite3.so.*.*.* |
222 | %attr(755,root,root) %ghost %{_libdir}/libsqlite3.so.0 | |
c743401f | 223 | %{_mandir}/man1/sqlite3.1* |
17b8c9f1 | 224 | |
225 | %files devel | |
226 | %defattr(644,root,root,755) | |
7e92c022 JB |
227 | %attr(755,root,root) %{_libdir}/libsqlite3.so |
228 | %{_libdir}/libsqlite3.la | |
17b8c9f1 | 229 | %{_includedir}/sqlite3.h |
ef88c71c | 230 | %{_includedir}/sqlite3ext.h |
7e92c022 | 231 | %{_pkgconfigdir}/sqlite3.pc |
17b8c9f1 | 232 | |
233 | %files static | |
234 | %defattr(644,root,root,755) | |
7e92c022 | 235 | %{_libdir}/libsqlite3.a |
c743401f | 236 | |
1a6aae8d | 237 | %if %{with tcl} |
c743401f AM |
238 | %files -n tcl-%{name} |
239 | %defattr(644,root,root,755) | |
80deaf18 | 240 | %dir %{_libdir}/tcl*/sqlite3 |
7e92c022 JB |
241 | %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so |
242 | %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl | |
1a6aae8d | 243 | %endif |