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