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