]>
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 | |
8ef92c1a | 4 | # - enable --enable-load-extension? |
17b8c9f1 | 5 | # |
6 | # Conditional build: | |
d12e8042 | 7 | %bcond_with tests # run tests |
dd55e3fd | 8 | %bcond_without tcl # Tcl extension |
d12e8042 JB |
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 | |
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 | ||
7e2f6050 ER |
23 | #define version_num %(echo %{version} | awk -F. '{printf("%d%02d%02d%02d", $1, $2, $3, $4)}') |
24 | %define version_num 3071300 | |
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 |
c883dce2 | 31 | Version: 3.7.13 |
1dca1e50 | 32 | Release: 1 |
dd55e3fd | 33 | License: Public Domain |
17b8c9f1 | 34 | Group: Libraries |
65cfa56f | 35 | # Source0Download: http://www.sqlite.org/download.html |
c883dce2 ER |
36 | Source0: http://www.sqlite.org/sqlite-src-%{version_num}.zip |
37 | # Source0-md5: 13bb3eaae94592ef3220ea23582763f5 | |
a3d8a32d | 38 | Patch0: %{name}-sign-function.patch |
65cfa56f | 39 | URL: http://www.sqlite.org/ |
d70f95dc | 40 | %{?with_load_extension:Provides: %{name}(load_extension)} |
41 | %{?with_unlock_notify:Provides: %{name}(unlock_notify)} | |
dd55e3fd | 42 | BuildRequires: autoconf >= 2.50 |
17b8c9f1 | 43 | BuildRequires: automake |
44 | BuildRequires: libtool | |
45 | BuildRequires: readline-devel | |
6ca4ac16 | 46 | %{?with_load_extension:BuildRequires: sed >= 4.0} |
0e44e992 | 47 | BuildRequires: tcl |
1a6aae8d | 48 | %{?with_tcl:BuildRequires: tcl-devel} |
086e11d9 | 49 | BuildRequires: unzip |
17b8c9f1 | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | SQLite is a C library that implements an SQL database engine. A large | |
54 | subset of SQL92 is supported. A complete database is stored in a | |
55 | single disk file. The API is designed for convenience and ease of use. | |
56 | Applications that link against SQLite can enjoy the power and | |
57 | flexiblity of an SQL database without the administrative hassles of | |
58 | supporting a separate database server. Because it omits the | |
59 | client-server interaction overhead and writes directly to disk, SQLite | |
60 | is also faster than the big database servers for most operations. In | |
61 | addition to the C library, the SQLite distribution includes a | |
62 | command-line tool for interacting with SQLite databases and SQLite | |
63 | bindings for Tcl/Tk. | |
64 | ||
b7c0e1f2 JR |
65 | %description -l pl.UTF-8 |
66 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
67 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
68 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
69 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
70 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
71 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
72 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
73 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
74 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 75 | bazami danych. |
76 | ||
77 | %package devel | |
78 | Summary: Header files for SQLite development | |
e882a99f | 79 | Summary(pl.UTF-8): Pliki nagłówkowe SQLite |
17b8c9f1 | 80 | Group: Development/Libraries |
81 | Requires: %{name} = %{version}-%{release} | |
d70f95dc | 82 | %if %{with unlock_notify} |
83 | Requires: %{name}(unlock_notify) | |
84 | Provides: %{name}-devel(unlock_notify) | |
85 | %endif | |
86 | %if %{with load_extension} | |
87 | Requires: %{name}(load_extension) | |
88 | Provides: %{name}-devel(load_extension) | |
89 | %endif | |
17b8c9f1 | 90 | |
91 | %description devel | |
92 | SQLite is a C library that implements an SQL database engine. A large | |
93 | subset of SQL92 is supported. A complete database is stored in a | |
94 | single disk file. The API is designed for convenience and ease of use. | |
95 | Applications that link against SQLite can enjoy the power and | |
96 | flexiblity of an SQL database without the administrative hassles of | |
97 | supporting a separate database server. Because it omits the | |
98 | client-server interaction overhead and writes directly to disk, SQLite | |
99 | is also faster than the big database servers for most operations. In | |
100 | addition to the C library, the SQLite distribution includes a | |
101 | command-line tool for interacting with SQLite databases and SQLite | |
102 | bindings for Tcl/Tk. | |
103 | ||
104 | This package contains the header files needed to develop programs that | |
105 | use these SQLite. | |
106 | ||
b7c0e1f2 JR |
107 | %description devel -l pl.UTF-8 |
108 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
109 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
110 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
111 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
112 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
113 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
114 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
115 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
116 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 117 | bazami danych. |
118 | ||
b7c0e1f2 JR |
119 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
120 | używających biblioteki SQLite. | |
17b8c9f1 | 121 | |
122 | %package static | |
123 | Summary: Static libraries for SQLite development | |
e882a99f | 124 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 125 | Group: Development/Libraries |
126 | Requires: %{name}-devel = %{version}-%{release} | |
d70f95dc | 127 | %if %{with unclock_notify} |
128 | Requires: %{name}-devel(unlock_notify) | |
129 | Provides: %{name}-static(unlock_notify) | |
130 | %endif | |
131 | %if %{with load_extension} | |
132 | Requires: %{name}-devel(load_extension) | |
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 | |
faed6cf7 ER |
180 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile* |
181 | ||
17b8c9f1 | 182 | %build |
183 | %{__libtoolize} | |
184 | cp -f /usr/share/automake/config.sub . | |
185 | %{__aclocal} | |
186 | %{__autoconf} | |
6ca4ac16 | 187 | 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 | 188 | export CFLAGS |
6ca4ac16 | 189 | %if %{with load_extension} |
190 | LIBS=-ldl | |
191 | export LIBS | |
192 | %endif | |
87af9815 MB |
193 | %if %{with tcl} |
194 | export TCLLIBDIR="%{tcl_sitearch}/sqlite3" | |
195 | %endif | |
17b8c9f1 | 196 | %configure \ |
1a6aae8d | 197 | %{?with_tcl:--with-tcl=%{_ulibdir}} \ |
198 | %{!?with_tcl:--disable-tcl} \ | |
17b8c9f1 | 199 | --enable-threadsafe |
6ca4ac16 | 200 | %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile} |
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 |