]> git.pld-linux.org Git - packages/sqlite3.git/blob - sqlite3.spec
32e4a50cf1063a56e1d96d3ccc79a1a8bf55b174
[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 # - enable --enable-load-extension?
5 #
6 # Conditional build:
7 %bcond_with     tests   # run tests
8 %bcond_with     tcl     # enable tcl extension
9 %bcond_without  doc     # disable documentation building
10 %bcond_without  unlock_notify   # enable unlock notify api
11 %bcond_with     load_extension  # enable load extension api
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         realver         3070500
24 %define         srcver          src
25 %define         rpmver          %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g")
26 %define         _ulibdir        /usr/lib
27 %define         tclver          8.5
28
29 Summary:        SQLite library
30 Summary(pl.UTF-8):      Biblioteka SQLite
31 Name:           sqlite3
32 Version:        3.7.5
33 Release:        2
34 License:        LGPL
35 Group:          Libraries
36 # Source0Download: http://www.sqlite.org/download.html
37 Source0:        http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip
38 # Source0-md5:  d61d784997d42cd0d92bac7994094c56
39 Patch0:         %{name}-sign-function.patch
40 URL:            http://www.sqlite.org/
41 BuildRequires:  autoconf
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
82 %description devel
83 SQLite is a C library that implements an SQL database engine. A large
84 subset of SQL92 is supported. A complete database is stored in a
85 single disk file. The API is designed for convenience and ease of use.
86 Applications that link against SQLite can enjoy the power and
87 flexiblity of an SQL database without the administrative hassles of
88 supporting a separate database server. Because it omits the
89 client-server interaction overhead and writes directly to disk, SQLite
90 is also faster than the big database servers for most operations. In
91 addition to the C library, the SQLite distribution includes a
92 command-line tool for interacting with SQLite databases and SQLite
93 bindings for Tcl/Tk.
94
95 This package contains the header files needed to develop programs that
96 use these SQLite.
97
98 %description devel -l pl.UTF-8
99 SQLite jest biblioteką języka C, która implementuje silnik baz danych
100 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
101 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
102 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
103 danych bez konieczności utrzymywania osobnego serwera baz danych.
104 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
105 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
106 bazodanowych przy większości operacji na bazie danych. Dodatkowo
107 oprócz biblioteki języka C, dostarczany jest program do zarządzania
108 bazami danych.
109
110 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
111 używających biblioteki SQLite.
112
113 %package static
114 Summary:        Static libraries for SQLite development
115 Summary(pl.UTF-8):      Statyczne biblioteki SQLite
116 Group:          Development/Libraries
117 Requires:       %{name}-devel = %{version}-%{release}
118
119 %description static
120 SQLite is a C library that implements an SQL database engine. A large
121 subset of SQL92 is supported. A complete database is stored in a
122 single disk file. The API is designed for convenience and ease of use.
123 Applications that link against SQLite can enjoy the power and
124 flexiblity of an SQL database without the administrative hassles of
125 supporting a separate database server. Because it omits the
126 client-server interaction overhead and writes directly to disk, SQLite
127 is also faster than the big database servers for most operations. In
128 addition to the C library, the SQLite distribution includes a
129 command-line tool for interacting with SQLite databases and SQLite
130 bindings for Tcl/Tk.
131
132 This package contains the static SQLite libraries.
133
134 %description static -l pl.UTF-8
135 SQLite jest biblioteką języka C, która implementuje silnik baz danych
136 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
137 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
138 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
139 danych bez konieczności utrzymywania osobnego serwera baz danych.
140 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
141 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
142 bazodanowych przy większości operacji na bazie danych. Dodatkowo
143 oprócz biblioteki języka C, dostarczany jest program do zarządzania
144 bazami danych.
145
146 Pakiet zawiera statyczne biblioteki SQLite.
147
148 %package -n tcl-%{name}
149 Summary:        sqlite3 tcl extension
150 Summary(pl.UTF-8):      Rozszerzenie sqlite3 dla Tcl
151 Group:          Development/Languages/Tcl
152
153 %description -n tcl-%{name}
154 sqlite3 tcl extension.
155
156 %description -n tcl-%{name} -l pl.UTF-8
157 Rozszerzenie sqlite3 dla Tcl.
158
159 %prep
160 %setup -q -n sqlite-%{srcver}-%{realver}
161 %patch0 -p1
162
163 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
164
165 %build
166 %{__libtoolize}
167 cp -f /usr/share/automake/config.sub .
168 %{__aclocal}
169 %{__autoconf}
170 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}"
171 export CFLAGS
172 %if %{with load_extension}
173 LIBS=-ldl
174 export LIBS
175 %endif
176 %configure \
177         %{?with_tcl:--with-tcl=%{_ulibdir}} \
178         %{!?with_tcl:--disable-tcl} \
179         --enable-threadsafe
180 %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
181 %{__make}
182
183 %if %{with doc}
184 %{__make} doc
185 %endif
186
187 %{?with_tests:LC_ALL=C %{__make} test}
188
189 %install
190 rm -rf $RPM_BUILD_ROOT
191 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
192
193 %{__make} install \
194         DESTDIR=$RPM_BUILD_ROOT \
195         TCLLIBDIR=%{_libdir}/tcl%{tclver}
196
197 %if %{with tcl}
198 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
199 %endif
200
201 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
202 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.so
203 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
204         $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
205
206 cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
207
208 %clean
209 rm -rf $RPM_BUILD_ROOT
210
211 %post   -p /sbin/ldconfig
212 %postun -p /sbin/ldconfig
213
214 %files
215 %defattr(644,root,root,755)
216 %doc README
217 %attr(755,root,root) %{_bindir}/sqlite3
218 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
219 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
220 %{_mandir}/man1/sqlite3.1*
221
222 %files devel
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libsqlite3.so
225 %{_libdir}/libsqlite3.la
226 %{_includedir}/sqlite3.h
227 %{_includedir}/sqlite3ext.h
228 %{_pkgconfigdir}/sqlite3.pc
229
230 %files static
231 %defattr(644,root,root,755)
232 %{_libdir}/libsqlite3.a
233
234 %if %{with tcl}
235 %files -n tcl-%{name}
236 %defattr(644,root,root,755)
237 %dir %{_libdir}/tcl*/sqlite3
238 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
239 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
240 %endif
This page took 0.065398 seconds and 2 git commands to generate.