]> git.pld-linux.org Git - packages/sqlite3.git/blob - sqlite3.spec
- updated to 3.7.9
[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_without  tcl             # Tcl extension
9 %bcond_without  doc             # disable documentation building
10 %bcond_without  unlock_notify   # disable 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         3070900
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.9
33 Release:        1
34 License:        Public Domain
35 Group:          Libraries
36 # Source0Download: http://www.sqlite.org/download.html
37 Source0:        http://www.sqlite.org/sqlite-%{srcver}-%{realver}.zip
38 # Source0-md5:  b2646c5a0c0b5bc6b8f0b67fc318bab3
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 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 Requires:       %{name}(unlock_notify)
85 Provides:       %{name}-devel(unlock_notify)
86 %endif
87 %if %{with load_extension}
88 Requires:       %{name}(load_extension)
89 Provides:       %{name}-devel(load_extension)
90 %endif
91
92 %description devel
93 SQLite is a C library that implements an SQL database engine. A large
94 subset of SQL92 is supported. A complete database is stored in a
95 single disk file. The API is designed for convenience and ease of use.
96 Applications that link against SQLite can enjoy the power and
97 flexiblity of an SQL database without the administrative hassles of
98 supporting a separate database server. Because it omits the
99 client-server interaction overhead and writes directly to disk, SQLite
100 is also faster than the big database servers for most operations. In
101 addition to the C library, the SQLite distribution includes a
102 command-line tool for interacting with SQLite databases and SQLite
103 bindings for Tcl/Tk.
104
105 This package contains the header files needed to develop programs that
106 use these SQLite.
107
108 %description devel -l pl.UTF-8
109 SQLite jest biblioteką języka C, która implementuje silnik baz danych
110 SQL (obsługiwana jest większość standardu SQL92). Cała baza danych
111 przechowywana jest w jednym pliku. Aplikacje wykorzystujące tę
112 bibliotekę charakteryzują się siłą i elastycznością SQLowych baz
113 danych bez konieczności utrzymywania osobnego serwera baz danych.
114 Ponieważ pomijana jest komunikacja klient-serwer i dane są zapisywane
115 bezpośrednio na dysku, SQLite jest szybsza od dużych serwerów
116 bazodanowych przy większości operacji na bazie danych. Dodatkowo
117 oprócz biblioteki języka C, dostarczany jest program do zarządzania
118 bazami danych.
119
120 Pakiet zawiera pliki nagówkowe niezbedne do kompilowania programów
121 używających biblioteki SQLite.
122
123 %package static
124 Summary:        Static libraries for SQLite development
125 Summary(pl.UTF-8):      Statyczne biblioteki SQLite
126 Group:          Development/Libraries
127 Requires:       %{name}-devel = %{version}-%{release}
128 %if %{with unclock_notify}
129 Requires:       %{name}-devel(unlock_notify)
130 Provides:       %{name}-static(unlock_notify)
131 %endif
132 %if %{with load_extension}
133 Requires:       %{name}-devel(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-%{srcver}-%{realver}
179 %patch0 -p1
180
181 %{__sed} -i 's/mkdir doc/#mkdir doc/' Makefile*
182
183 %build
184 %{__libtoolize}
185 cp -f /usr/share/automake/config.sub .
186 %{__aclocal}
187 %{__autoconf}
188 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}"
189 export CFLAGS
190 %if %{with load_extension}
191 LIBS=-ldl
192 export LIBS
193 %endif
194 %if %{with tcl}
195 export TCLLIBDIR="%{tcl_sitearch}/sqlite3"
196 %endif
197 %configure \
198         %{?with_tcl:--with-tcl=%{_ulibdir}} \
199         %{!?with_tcl:--disable-tcl} \
200         --enable-threadsafe
201 %{?with_load_extension:sed -i~ s/-DSQLITE_OMIT_LOAD_EXTENSION=1// Makefile}
202 %{__make}
203
204 %if %{with doc}
205 %{__make} doc
206 %endif
207
208 %{?with_tests:LC_ALL=C %{__make} test}
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT{/%{_lib},%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
213
214 %{__make} install \
215         DESTDIR=$RPM_BUILD_ROOT
216
217 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
218 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.so
219 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo lib*.so.*.*) \
220         $RPM_BUILD_ROOT%{_libdir}/libsqlite3.so
221
222 cp -a sqlite3.1 $RPM_BUILD_ROOT%{_mandir}/man1
223
224 %clean
225 rm -rf $RPM_BUILD_ROOT
226
227 %post   -p /sbin/ldconfig
228 %postun -p /sbin/ldconfig
229
230 %files
231 %defattr(644,root,root,755)
232 %doc README
233 %attr(755,root,root) %{_bindir}/sqlite3
234 %attr(755,root,root) /%{_lib}/libsqlite3.so.*.*.*
235 %attr(755,root,root) %ghost /%{_lib}/libsqlite3.so.0
236 %{_mandir}/man1/sqlite3.1*
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libsqlite3.so
241 %{_libdir}/libsqlite3.la
242 %{_includedir}/sqlite3.h
243 %{_includedir}/sqlite3ext.h
244 %{_pkgconfigdir}/sqlite3.pc
245
246 %files static
247 %defattr(644,root,root,755)
248 %{_libdir}/libsqlite3.a
249
250 %if %{with tcl}
251 %files -n tcl-%{name}
252 %defattr(644,root,root,755)
253 %dir %{_libdir}/tcl*/sqlite3
254 %attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtclsqlite3.so
255 %{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
256 %endif
This page took 0.045602 seconds and 4 git commands to generate.