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