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