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