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