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