]> git.pld-linux.org Git - packages/sqlite3.git/blob - sqlite3.spec
029bb21d0129a9a3c4b076930e8126a56b18b38d
[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 #
5 # Conditional build:
6 %bcond_with     tests           # run tests
7 %bcond_without  tcl             # Tcl extension
8 %bcond_without  doc             # disable documentation building
9 %bcond_without  unlock_notify   # disable unlock notify API
10 %bcond_without  load_extension  # enable load extension API
11 %bcond_with             icu             # ICU tokenizer support
12
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
19 %if %{without tcl}
20 %undefine       with_tests
21 %endif
22
23 #define         version_num %(echo %{version} |  awk -F. '{printf("%d%02d%02d%02d", $1, $2, $3, $4)}')
24 %define         version_num 3080300
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.8.3.0
32 Release:        2
33 License:        Public Domain
34 Group:          Libraries
35 # Source0Download: http://www.sqlite.org/download.html
36 Source0:        http://www.sqlite.org/2014/sqlite-src-%{version_num}.zip
37 # Source0-md5:  bdcac4ea67646e7d5a659b635f0639be
38 Patch0:         %{name}-sign-function.patch
39 URL:            http://www.sqlite.org/
40 %{?with_load_extension:Provides:        %{name}(load_extension)}
41 %{?with_unlock_notify:Provides: %{name}(unlock_notify)}
42 %{?with_icu:Provides:   %{name}(icu)}
43 BuildRequires:  autoconf >= 2.50
44 BuildRequires:  automake
45 BuildRequires:  libtool
46 BuildRequires:  readline-devel
47 %{?with_load_extension:BuildRequires:   sed >= 4.0}
48 BuildRequires:  tcl
49 %{?with_tcl:BuildRequires:      tcl-devel}
50 BuildRequires:  unzip
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
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
76 bazami danych.
77
78 %package devel
79 Summary:        Header files for SQLite development
80 Summary(pl.UTF-8):      Pliki nagłówkowe SQLite
81 Group:          Development/Libraries
82 Requires:       %{name} = %{version}-%{release}
83 %if %{with unlock_notify}
84 Provides:       %{name}-devel(unlock_notify)
85 %endif
86 %if %{with load_extension}
87 Provides:       %{name}-devel(load_extension)
88 %endif
89 %if %{with icu}
90 Provides:       %{name}-devel(icu)
91 %endif
92
93 %description devel
94 SQLite is a C library that implements an SQL database engine. A large
95 subset of SQL92 is supported. A complete database is stored in a
96 single disk file. The API is designed for convenience and ease of use.
97 Applications that link against SQLite can enjoy the power and
98 flexiblity of an SQL database without the administrative hassles of
99 supporting a separate database server. Because it omits the
100 client-server interaction overhead and writes directly to disk, SQLite
101 is also faster than the big database servers for most operations. In
102 addition to the C library, the SQLite distribution includes a
103 command-line tool for interacting with SQLite databases and SQLite
104 bindings for Tcl/Tk.
105
106 This package contains the header files needed to develop programs that
107 use these SQLite.
108
109 %description devel -l pl.UTF-8
110 SQLite jest biblioteką języka C, która implementuje silnik baz danych
111 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
112 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
113 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
114 danych bez konieczności utrzymywania osobnego serwera baz danych.
115 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
116 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
117 bazodanowych przy większości operacji na bazie danych. Dodatkowo
118 oprócz biblioteki języka C, dostarczany jest program do zarządzania
119 bazami danych.
120
121 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
122 używających biblioteki SQLite.
123
124 %package static
125 Summary:        Static libraries for SQLite development
126 Summary(pl.UTF-8):      Statyczne biblioteki SQLite
127 Group:          Development/Libraries
128 Requires:       %{name}-devel = %{version}-%{release}
129 %if %{with unclock_notify}
130 Provides:       %{name}-static(unlock_notify)
131 %endif
132 %if %{with load_extension}
133 Provides:       %{name}-static(load_extension)
134 %endif
135
136 %description static
137 SQLite is a C library that implements an SQL database engine. A large
138 subset of SQL92 is supported. A complete database is stored in a
139 single disk file. The API is designed for convenience and ease of use.
140 Applications that link against SQLite can enjoy the power and
141 flexiblity of an SQL database without the administrative hassles of
142 supporting a separate database server. Because it omits the
143 client-server interaction overhead and writes directly to disk, SQLite
144 is also faster than the big database servers for most operations. In
145 addition to the C library, the SQLite distribution includes a
146 command-line tool for interacting with SQLite databases and SQLite
147 bindings for Tcl/Tk.
148
149 This package contains the static SQLite libraries.
150
151 %description static -l pl.UTF-8
152 SQLite jest biblioteką języka C, która implementuje silnik baz danych
153 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
154 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
155 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
156 danych bez konieczności utrzymywania osobnego serwera baz danych.
157 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
158 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
159 bazodanowych przy większości operacji na bazie danych. Dodatkowo
160 oprócz biblioteki języka C, dostarczany jest program do zarządzania
161 bazami danych.
162
163 Pakiet zawiera statyczne biblioteki SQLite.
164
165 %package -n tcl-%{name}
166 Summary:        sqlite3 tcl extension
167 Summary(pl.UTF-8):      Rozszerzenie sqlite3 dla Tcl
168 Group:          Development/Languages/Tcl
169
170 %description -n tcl-%{name}
171 sqlite3 tcl extension.
172
173 %description -n tcl-%{name} -l pl.UTF-8
174 Rozszerzenie sqlite3 dla Tcl.
175
176 %prep
177 %setup -q -n sqlite-src-%{version_num}
178 %patch0 -p1
179
180 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile.in
181
182 %build
183 %{__libtoolize}
184 cp -f /usr/share/automake/config.sub .
185 %{__aclocal}
186 %{__autoconf}
187 append-cppflags() {
188         CPPFLAGS="$CPPFLAGS $*"
189 }
190 append-libs() {
191         LIBS="$LIBS $*"
192 }
193 export CPPFLAGS="%{rpmcflags}"
194 export LIBS
195 %if %{with tcl}
196 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
197 %endif
198
199 append-cppflags -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE
200
201 # Support column metadata functions.
202 # http://sqlite.org/c3ref/column_database_name.html
203 # http://sqlite.org/c3ref/table_column_metadata.html
204 append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
205
206 # Support Full-Text Search versions 3 and 4.
207 # http://sqlite.org/fts3.html
208 #append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS4_UNICODE61
209 append-cppflags -DSQLITE_ENABLE_FTS3
210
211 # Support R*Trees.
212 # http://sqlite.org/rtree.html
213 append-cppflags -DSQLITE_ENABLE_RTREE
214
215 # Support soundex() function.
216 # http://sqlite.org/lang_corefunc.html#soundex
217 #append-cppflags -DSQLITE_SOUNDEX
218
219 %if %{with unlock_notify}
220 # Support unlock notification.
221 # http://sqlite.org/unlock_notify.html
222 append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
223 %endif
224
225 %if %{with icu}
226 append-cppflags -DSQLITE_ENABLE_ICU
227 append-libs "-licui18n -licuuc"
228 %endif
229
230 %if %{with load_extension}
231 append-libs "-ldl"
232 %endif
233
234 %configure \
235         %{!?with_tcl:--disable-tcl}%{?with_tcl:--with-tcl=%{_ulibdir}} \
236         %{__enable_disable load_extension load-extension} \
237         --enable-threadsafe
238
239 %{__make}
240
241 %if %{with doc}
242 %{__make} doc
243 %endif
244
245 %{?with_tests:LC_ALL=C %{__make} test}
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
250 %{__make} install \
251         DESTDIR=$RPM_BUILD_ROOT
252
253 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
254 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
255 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
256         $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
257
258 cp -p sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
259
260 %clean
261 rm -rf $RPM_BUILD_ROOT
262
263 %post   -p /sbin/ldconfig
264 %postun -p /sbin/ldconfig
265
266 %files
267 %defattr(644,root,root,755)
268 %doc README
269 %attr(755,root,root) %{_bindir}/sqlite3
270 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
271 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
272 %{_mandir}/man1/sqlite3.1*
273
274 %files devel
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/libsqlite3.so
277 %{_libdir}/libsqlite3.la
278 %{_includedir}/sqlite3.h
279 %{_includedir}/sqlite3ext.h
280 %{_pkgconfigdir}/sqlite3.pc
281
282 %files static
283 %defattr(644,root,root,755)
284 %{_libdir}/libsqlite3.a
285
286 %if %{with tcl}
287 %files -n tcl-%{name}
288 %defattr(644,root,root,755)
289 %dir %{_libdir}/tcl*/sqlite3
290 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
291 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
292 %endif
This page took 0.060802 seconds and 2 git commands to generate.