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