]>
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 JB |
7 | %bcond_with tests # run tests |
8 | %bcond_with tcl # enable tcl extension | |
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 | ||
086e11d9 | 23 | %define realver 3070500 |
24 | %define srcver src | |
25 | %define rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g") | |
65cfa56f | 26 | %define _ulibdir /usr/lib |
539069d8 | 27 | %define tclver 8.5 |
f1015391 | 28 | |
17b8c9f1 | 29 | Summary: SQLite library |
e882a99f | 30 | Summary(pl.UTF-8): Biblioteka SQLite |
22ef5ab8 | 31 | Name: sqlite3 |
086e11d9 | 32 | Version: 3.7.5 |
2a775d34 | 33 | Release: 2 |
17b8c9f1 | 34 | License: LGPL |
35 | Group: Libraries | |
65cfa56f | 36 | # Source0Download: http://www.sqlite.org/download.html |
086e11d9 | 37 | Source0: http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip |
38 | # Source0-md5: d61d784997d42cd0d92bac7994094c56 | |
a3d8a32d | 39 | Patch0: %{name}-sign-function.patch |
65cfa56f | 40 | URL: http://www.sqlite.org/ |
d70f95dc | 41 | %{?with_load_extension:Provides: %{name}(load_extension)} |
42 | %{?with_unlock_notify:Provides: %{name}(unlock_notify)} | |
17b8c9f1 | 43 | BuildRequires: autoconf |
44 | BuildRequires: automake | |
45 | BuildRequires: libtool | |
46 | BuildRequires: readline-devel | |
6ca4ac16 | 47 | %{?with_load_extension:BuildRequires: sed >= 4.0} |
0e44e992 | 48 | BuildRequires: tcl |
1a6aae8d | 49 | %{?with_tcl:BuildRequires: tcl-devel} |
086e11d9 | 50 | BuildRequires: unzip |
17b8c9f1 | 51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
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} |
84 | Requires: %{name}(unlock_notify) | |
85 | Provides: %{name}-devel(unlock_notify) | |
86 | %endif | |
87 | %if %{with load_extension} | |
88 | Requires: %{name}(load_extension) | |
89 | Provides: %{name}-devel(load_extension) | |
90 | %endif | |
17b8c9f1 | 91 | |
92 | %description devel | |
93 | SQLite is a C library that implements an SQL database engine. A large | |
94 | subset of SQL92 is supported. A complete database is stored in a | |
95 | single disk file. The API is designed for convenience and ease of use. | |
96 | Applications that link against SQLite can enjoy the power and | |
97 | flexiblity of an SQL database without the administrative hassles of | |
98 | supporting a separate database server. Because it omits the | |
99 | client-server interaction overhead and writes directly to disk, SQLite | |
100 | is also faster than the big database servers for most operations. In | |
101 | addition to the C library, the SQLite distribution includes a | |
102 | command-line tool for interacting with SQLite databases and SQLite | |
103 | bindings for Tcl/Tk. | |
104 | ||
105 | This package contains the header files needed to develop programs that | |
106 | use these SQLite. | |
107 | ||
b7c0e1f2 JR |
108 | %description devel -l pl.UTF-8 |
109 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
110 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
111 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
112 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
113 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
114 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
115 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
116 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
117 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 118 | bazami danych. |
119 | ||
b7c0e1f2 JR |
120 | Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów |
121 | używających biblioteki SQLite. | |
17b8c9f1 | 122 | |
123 | %package static | |
124 | Summary: Static libraries for SQLite development | |
e882a99f | 125 | Summary(pl.UTF-8): Statyczne biblioteki SQLite |
17b8c9f1 | 126 | Group: Development/Libraries |
127 | Requires: %{name}-devel = %{version}-%{release} | |
d70f95dc | 128 | %if %{with unclock_notify} |
129 | Requires: %{name}-devel(unlock_notify) | |
130 | Provides: %{name}-static(unlock_notify) | |
131 | %endif | |
132 | %if %{with load_extension} | |
133 | Requires: %{name}-devel(load_extension) | |
134 | Provides: %{name}-static(load_extension) | |
135 | %endif | |
17b8c9f1 | 136 | |
137 | %description static | |
138 | SQLite is a C library that implements an SQL database engine. A large | |
139 | subset of SQL92 is supported. A complete database is stored in a | |
140 | single disk file. The API is designed for convenience and ease of use. | |
141 | Applications that link against SQLite can enjoy the power and | |
142 | flexiblity of an SQL database without the administrative hassles of | |
143 | supporting a separate database server. Because it omits the | |
144 | client-server interaction overhead and writes directly to disk, SQLite | |
145 | is also faster than the big database servers for most operations. In | |
146 | addition to the C library, the SQLite distribution includes a | |
147 | command-line tool for interacting with SQLite databases and SQLite | |
148 | bindings for Tcl/Tk. | |
149 | ||
150 | This package contains the static SQLite libraries. | |
151 | ||
b7c0e1f2 JR |
152 | %description static -l pl.UTF-8 |
153 | SQLite jest biblioteką języka C, która implementuje silnik baz danych | |
154 | SQL (obsługiwana jest większość standardu SQL92). Cała baza danych | |
155 | przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę | |
156 | bibliotekę charakteryzują się siłą i elastycznością SQLowych baz | |
157 | danych bez konieczności utrzymywania osobnego serwera baz danych. | |
158 | Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane | |
159 | bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów | |
160 | bazodanowych przy większości operacji na bazie danych. Dodatkowo | |
161 | oprócz biblioteki języka C, dostarczany jest program do zarządzania | |
17b8c9f1 | 162 | bazami danych. |
163 | ||
164 | Pakiet zawiera statyczne biblioteki SQLite. | |
165 | ||
c743401f | 166 | %package -n tcl-%{name} |
8e66772b | 167 | Summary: sqlite3 tcl extension |
e882a99f | 168 | Summary(pl.UTF-8): Rozszerzenie sqlite3 dla Tcl |
8e66772b | 169 | Group: Development/Languages/Tcl |
c743401f AM |
170 | |
171 | %description -n tcl-%{name} | |
172 | sqlite3 tcl extension. | |
173 | ||
b7c0e1f2 | 174 | %description -n tcl-%{name} -l pl.UTF-8 |
c743401f AM |
175 | Rozszerzenie sqlite3 dla Tcl. |
176 | ||
17b8c9f1 | 177 | %prep |
086e11d9 | 178 | %setup -q -n sqlite-%{srcver}-%{realver} |
30682d5a | 179 | %patch0 -p1 |
1cd2f537 | 180 | |
faed6cf7 ER |
181 | %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile* |
182 | ||
17b8c9f1 | 183 | %build |
184 | %{__libtoolize} | |
185 | cp -f /usr/share/automake/config.sub . | |
186 | %{__aclocal} | |
187 | %{__autoconf} | |
6ca4ac16 | 188 | 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 | 189 | export CFLAGS |
6ca4ac16 | 190 | %if %{with load_extension} |
191 | LIBS=-ldl | |
192 | export LIBS | |
193 | %endif | |
17b8c9f1 | 194 | %configure \ |
1a6aae8d | 195 | %{?with_tcl:--with-tcl=%{_ulibdir}} \ |
196 | %{!?with_tcl:--disable-tcl} \ | |
17b8c9f1 | 197 | --enable-threadsafe |
6ca4ac16 | 198 | %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile} |
5df4522e | 199 | %{__make} |
1a6aae8d | 200 | |
e16bc4b1 | 201 | %if %{with doc} |
17b8c9f1 | 202 | %{__make} doc |
1a6aae8d | 203 | %endif |
17b8c9f1 | 204 | |
3e5df83c | 205 | %{?with_tests:LC_ALL=C %{__make} test} |
17b8c9f1 | 206 | |
207 | %install | |
208 | rm -rf $RPM_BUILD_ROOT | |
1c91d9d5 | 209 | install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1} |
17b8c9f1 | 210 | |
211 | %{__make} install \ | |
80deaf18 JR |
212 | DESTDIR=$RPM_BUILD_ROOT \ |
213 | TCLLIBDIR=%{_libdir}/tcl%{tclver} | |
17b8c9f1 | 214 | |
22de4c1c | 215 | %if %{with tcl} |
7e92c022 | 216 | sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl |
22de4c1c | 217 | %endif |
ec30f86a | 218 | |
1c91d9d5 JR |
219 | mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib} |
220 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.so | |
221 | ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \ | |
222 | $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so | |
223 | ||
5df4522e | 224 | cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
17b8c9f1 | 225 | |
226 | %clean | |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
229 | %post -p /sbin/ldconfig | |
230 | %postun -p /sbin/ldconfig | |
231 | ||
232 | %files | |
233 | %defattr(644,root,root,755) | |
234 | %doc README | |
235 | %attr(755,root,root) %{_bindir}/sqlite3 | |
1c91d9d5 JR |
236 | %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.* |
237 | %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0 | |
c743401f | 238 | %{_mandir}/man1/sqlite3.1* |
17b8c9f1 | 239 | |
240 | %files devel | |
241 | %defattr(644,root,root,755) | |
7e92c022 JB |
242 | %attr(755,root,root) %{_libdir}/libsqlite3.so |
243 | %{_libdir}/libsqlite3.la | |
17b8c9f1 | 244 | %{_includedir}/sqlite3.h |
ef88c71c | 245 | %{_includedir}/sqlite3ext.h |
7e92c022 | 246 | %{_pkgconfigdir}/sqlite3.pc |
17b8c9f1 | 247 | |
248 | %files static | |
249 | %defattr(644,root,root,755) | |
7e92c022 | 250 | %{_libdir}/libsqlite3.a |
c743401f | 251 | |
1a6aae8d | 252 | %if %{with tcl} |
c743401f AM |
253 | %files -n tcl-%{name} |
254 | %defattr(644,root,root,755) | |
80deaf18 | 255 | %dir %{_libdir}/tcl*/sqlite3 |
7e92c022 JB |
256 | %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so |
257 | %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl | |
1a6aae8d | 258 | %endif |