]>
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 |
5df4522e | 11 | |
f1015391 JR |
12 | %ifarch alpha sparc %{x8664} |
13 | %undefine with_tests | |
14 | %endif | |
15 | ||
16 | # disabling tcl currently breaks making test target, | |
17 | # some hack in Makefile needs to be done | |
5df4522e | 18 | %if %{without tcl} |
f1015391 JR |
19 | %undefine with_tests |
20 | %endif | |
21 | ||
7e2f6050 | 22 | #define version_num %(echo %{version} | awk -F. '{printf("%d%02d%02d%02d", $1, $2, $3, $4)}') |
a20aff57 | 23 | %define version_num 3071401 |
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 |
a20aff57 ŁK |
30 | Version: 3.7.14.1 |
31 | Release: 1 | |
dd55e3fd | 32 | License: Public Domain |
17b8c9f1 | 33 | Group: Libraries |
65cfa56f | 34 | # Source0Download: http://www.sqlite.org/download.html |
c883dce2 | 35 | Source0: http://www.sqlite.org/sqlite-src-%{version_num}.zip |
a20aff57 | 36 | # Source0-md5: c594594be4c5353ceb43caade87ca7d6 |
a3d8a32d | 37 | Patch0: %{name}-sign-function.patch |
65cfa56f | 38 | URL: http://www.sqlite.org/ |
d70f95dc | 39 | %{?with_load_extension:Provides: %{name}(load_extension)} |
40 | %{?with_unlock_notify:Provides: %{name}(unlock_notify)} | |
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 |
1a6aae8d | 47 | %{?with_tcl:BuildRequires: tcl-devel} |
086e11d9 | 48 | BuildRequires: unzip |
17b8c9f1 | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
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 | |
62 | bindings for Tcl/Tk. | |
63 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 74 | bazami danych. |
75 | ||
76 | %package devel | |
77 | Summary: Header files for SQLite development | |
e882a99f | 78 | Summary(pl.UTF-8): Pliki nagłówkowe SQLite |
17b8c9f1 | 79 | Group: Development/Libraries |
80 | Requires: %{name} = %{version}-%{release} | |
d70f95dc | 81 | %if %{with unlock_notify} |
82 | Requires: %{name}(unlock_notify) | |
83 | Provides: %{name}-devel(unlock_notify) | |
84 | %endif | |
85 | %if %{with load_extension} | |
86 | Requires: %{name}(load_extension) | |
87 | Provides: %{name}-devel(load_extension) | |
88 | %endif | |
17b8c9f1 | 89 | |
90 | %description devel | |
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 | |
101 | bindings for Tcl/Tk. | |
102 | ||
103 | This package contains the header files needed to develop programs that | |
104 | use these SQLite. | |
105 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 116 | bazami danych. |
117 | ||
b7c0e1f2 JR |
118 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
119 | używających biblioteki SQLite. | |
17b8c9f1 | 120 | |
121 | %package static | |
122 | Summary: Static libraries for SQLite development | |
e882a99f | 123 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 124 | Group: Development/Libraries |
125 | Requires: %{name}-devel = %{version}-%{release} | |
d70f95dc | 126 | %if %{with unclock_notify} |
127 | Requires: %{name}-devel(unlock_notify) | |
128 | Provides: %{name}-static(unlock_notify) | |
129 | %endif | |
130 | %if %{with load_extension} | |
131 | Requires: %{name}-devel(load_extension) | |
132 | Provides: %{name}-static(load_extension) | |
133 | %endif | |
17b8c9f1 | 134 | |
135 | %description static | |
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 | |
146 | bindings for Tcl/Tk. | |
147 | ||
148 | This package contains the static SQLite libraries. | |
149 | ||
b7c0e1f2 JR |
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 | |
17b8c9f1 | 160 | bazami danych. |
161 | ||
162 | Pakiet zawiera statyczne biblioteki SQLite. | |
163 | ||
c743401f | 164 | %package -n tcl-%{name} |
8e66772b | 165 | Summary: sqlite3 tcl extension |
e882a99f | 166 | Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl |
8e66772b | 167 | Group: Development/Languages/Tcl |
c743401f AM |
168 | |
169 | %description -n tcl-%{name} | |
170 | sqlite3 tcl extension. | |
171 | ||
b7c0e1f2 | 172 | %description -n tcl-%{name} -l pl.UTF-8 |
c743401f AM |
173 | Rozszerzenie sqlite3 dla Tcl. |
174 | ||
17b8c9f1 | 175 | %prep |
c883dce2 | 176 | %setup -q -n sqlite-src-%{version_num} |
30682d5a | 177 | %patch0 -p1 |
1cd2f537 | 178 | |
faed6cf7 ER |
179 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile* |
180 | ||
17b8c9f1 | 181 | %build |
182 | %{__libtoolize} | |
183 | cp -f /usr/share/automake/config.sub . | |
184 | %{__aclocal} | |
185 | %{__autoconf} | |
6ca4ac16 | 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}" |
f1015391 | 187 | export CFLAGS |
6ca4ac16 | 188 | %if %{with load_extension} |
189 | LIBS=-ldl | |
190 | export LIBS | |
191 | %endif | |
87af9815 MB |
192 | %if %{with tcl} |
193 | export TCLLIBDIR="%{tcl_sitearch}/sqlite3" | |
194 | %endif | |
17b8c9f1 | 195 | %configure \ |
1a6aae8d | 196 | %{?with_tcl:--with-tcl=%{_ulibdir}} \ |
197 | %{!?with_tcl:--disable-tcl} \ | |
60f66380 | 198 | %{__enable_disable load_extension load-extension} \ |
17b8c9f1 | 199 | --enable-threadsafe |
60f66380 | 200 | |
5df4522e | 201 | %{__make} |
1a6aae8d | 202 | |
e16bc4b1 | 203 | %if %{with doc} |
17b8c9f1 | 204 | %{__make} doc |
1a6aae8d | 205 | %endif |
17b8c9f1 | 206 | |
3e5df83c | 207 | %{?with_tests:LC_ALL=C %{__make} test} |
17b8c9f1 | 208 | |
209 | %install | |
210 | rm -rf $RPM_BUILD_ROOT | |
1c91d9d5 | 211 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1} |
17b8c9f1 | 212 | |
213 | %{__make} install \ | |
dd55e3fd | 214 | DESTDIR=$RPM_BUILD_ROOT |
ec30f86a | 215 | |
1c91d9d5 | 216 | mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} |
dd55e3fd | 217 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so |
1c91d9d5 JR |
218 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \ |
219 | $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so | |
220 | ||
5df4522e | 221 | cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
17b8c9f1 | 222 | |
223 | %clean | |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %post -p /sbin/ldconfig | |
227 | %postun -p /sbin/ldconfig | |
228 | ||
229 | %files | |
230 | %defattr(644,root,root,755) | |
231 | %doc README | |
232 | %attr(755,root,root) %{_bindir}/sqlite3 | |
1c91d9d5 JR |
233 | %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.* |
234 | %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0 | |
c743401f | 235 | %{_mandir}/man1/sqlite3.1* |
17b8c9f1 | 236 | |
237 | %files devel | |
238 | %defattr(644,root,root,755) | |
7e92c022 JB |
239 | %attr(755,root,root) %{_libdir}/libsqlite3.so |
240 | %{_libdir}/libsqlite3.la | |
17b8c9f1 | 241 | %{_includedir}/sqlite3.h |
ef88c71c | 242 | %{_includedir}/sqlite3ext.h |
7e92c022 | 243 | %{_pkgconfigdir}/sqlite3.pc |
17b8c9f1 | 244 | |
245 | %files static | |
246 | %defattr(644,root,root,755) | |
7e92c022 | 247 | %{_libdir}/libsqlite3.a |
c743401f | 248 | |
1a6aae8d | 249 | %if %{with tcl} |
c743401f AM |
250 | %files -n tcl-%{name} |
251 | %defattr(644,root,root,755) | |
80deaf18 | 252 | %dir %{_libdir}/tcl*/sqlite3 |
7e92c022 JB |
253 | %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so |
254 | %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl | |
1a6aae8d | 255 | %endif |