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