2008-01-14 10:18:35 +01:00
|
|
|
#
|
2011-01-24 16:01:30 +01:00
|
|
|
# spec file for package sqlite3
|
2008-01-14 10:18:35 +01:00
|
|
|
#
|
2024-01-30 19:08:35 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2008-01-14 10:18:35 +01:00
|
|
|
#
|
2008-09-13 12:16:31 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-01-17 18:17:18 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-01-14 10:18:35 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-01-07 18:09:45 +01:00
|
|
|
%define oname sqlite
|
2024-05-23 21:30:28 +02:00
|
|
|
%define tarversion 3460000
|
|
|
|
%define docversion 3460000
|
2020-06-20 13:26:28 +02:00
|
|
|
%bcond_with icu
|
2022-03-16 19:44:06 +01:00
|
|
|
%bcond_without check
|
2016-08-02 14:04:29 +02:00
|
|
|
Name: sqlite3
|
2024-05-23 21:30:28 +02:00
|
|
|
Version: 3.46.0
|
2012-05-04 13:08:27 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Embeddable SQL Database Engine
|
2011-12-06 19:05:34 +01:00
|
|
|
License: SUSE-Public-Domain
|
2008-01-14 10:18:35 +01:00
|
|
|
Group: Productivity/Databases/Servers
|
2020-06-20 13:26:28 +02:00
|
|
|
URL: https://www.sqlite.org/
|
2023-03-21 16:10:35 +01:00
|
|
|
Source0: https://www.sqlite.org/2023/sqlite-src-%{tarversion}.zip
|
2016-01-07 15:08:29 +01:00
|
|
|
Source1: baselibs.conf
|
2023-11-22 18:34:30 +01:00
|
|
|
Source2: https://www.sqlite.org/2023/sqlite-doc-%{docversion}.zip
|
2016-03-07 15:02:44 +01:00
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
2016-08-02 14:04:29 +02:00
|
|
|
BuildRequires: pkgconfig
|
2012-05-04 13:08:27 +02:00
|
|
|
BuildRequires: readline-devel
|
2018-06-29 15:06:55 +02:00
|
|
|
BuildRequires: tcl-devel
|
2014-02-13 11:47:47 +01:00
|
|
|
BuildRequires: unzip
|
2021-04-06 17:00:05 +02:00
|
|
|
%if 0%{suse_version} < 1500
|
|
|
|
# As of 2021 we still need to be able to compile this on SLE-12
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
%global make_build make
|
|
|
|
%else
|
2018-02-02 09:02:41 +01:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2021-04-06 17:00:05 +02:00
|
|
|
%endif
|
2016-01-07 15:08:29 +01:00
|
|
|
Provides: %{oname} = %{version}
|
|
|
|
Obsoletes: %{oname} < %{version}
|
2020-06-20 13:26:28 +02:00
|
|
|
%if %{with icu}
|
|
|
|
BuildRequires: libicu-devel
|
|
|
|
%endif
|
2023-03-14 09:38:46 +01:00
|
|
|
%{?suse_build_hwcaps_libs}
|
2014-01-07 18:09:45 +01:00
|
|
|
|
2008-01-14 10:18:35 +01:00
|
|
|
%description
|
|
|
|
SQLite is a C library that implements an embeddable SQL database
|
|
|
|
engine. Programs that link with the SQLite library can have SQL
|
|
|
|
database access without running a separate RDBMS process.
|
|
|
|
|
|
|
|
SQLite is not a client library used to connect to a big database
|
|
|
|
server. SQLite is a server and the SQLite library reads and writes
|
|
|
|
directly to and from the database files on disk.
|
|
|
|
|
|
|
|
SQLite can be used via the sqlite command line tool or via any
|
|
|
|
application that supports the Qt database plug-ins.
|
|
|
|
|
|
|
|
%package -n libsqlite3-0
|
|
|
|
Summary: Shared libraries for the Embeddable SQL Database Engine
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libsqlite3-0
|
|
|
|
This package contains the shared libraries for the Embeddable SQL
|
|
|
|
Database Engine.
|
|
|
|
|
|
|
|
SQLite is a C library that implements an embeddable SQL database
|
|
|
|
engine. Programs that link with the SQLite library can have SQL
|
|
|
|
database access without running a separate RDBMS process.
|
|
|
|
|
|
|
|
SQLite is not a client library used to connect to a big database
|
|
|
|
server. SQLite is a server and the SQLite library reads and writes
|
|
|
|
directly to and from the database files on disk.
|
|
|
|
|
|
|
|
SQLite can be used via the sqlite command line tool or via any
|
|
|
|
application that supports the Qt database plug-ins.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Embeddable SQL Database Engine
|
2012-05-04 13:08:27 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: glibc-devel
|
2016-01-07 15:08:29 +01:00
|
|
|
Requires: libsqlite3-0 = %{version}
|
|
|
|
Suggests: %{name}-doc
|
|
|
|
Provides: %{oname}-devel = %{version}
|
|
|
|
Obsoletes: %{oname}-devel < %{version}
|
2008-01-14 10:18:35 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
SQLite is a C library that implements an embeddable SQL database
|
|
|
|
engine. Programs that link with the SQLite library can have SQL
|
|
|
|
database access without running a separate RDBMS process.
|
|
|
|
|
|
|
|
SQLite is not a client library used to connect to a big database
|
|
|
|
server; SQLite is the server. The SQLite library reads and writes
|
|
|
|
directly to and from the database files on disk.
|
|
|
|
|
|
|
|
SQLite can be used via the sqlite command-line tool or via any
|
|
|
|
application which supports the Qt database plug-ins.
|
|
|
|
|
2022-03-16 19:44:06 +01:00
|
|
|
%package tcl
|
|
|
|
Summary: Tcl binding for SQLite
|
|
|
|
Group: Development/Libraries/Tcl
|
|
|
|
|
|
|
|
%description tcl
|
|
|
|
This package contains laguage bindings from the Tcl programming
|
|
|
|
language SQLite.
|
|
|
|
|
|
|
|
SQLite is a C library that implements an embeddable SQL database
|
|
|
|
engine. Programs that link with the SQLite library can have SQL
|
|
|
|
database access without running a separate RDBMS process.
|
|
|
|
|
2014-02-13 11:47:47 +01:00
|
|
|
%package doc
|
2016-01-07 15:08:29 +01:00
|
|
|
Summary: Documentation for %{name}
|
2016-08-02 14:04:29 +02:00
|
|
|
Group: Documentation/Other
|
2014-02-13 11:47:47 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
|
|
|
Contains HTML documentation for SQLite: SQL Syntax, C/C++ API and
|
|
|
|
other documentation found on sqlite.org. The files can be found in
|
2016-01-07 15:08:29 +01:00
|
|
|
%{_docdir}/%{name}-doc.
|
2014-02-13 11:47:47 +01:00
|
|
|
|
2008-01-14 10:18:35 +01:00
|
|
|
%prep
|
2024-01-30 19:08:35 +01:00
|
|
|
# Version and %tarversion need to match, but %docversion might be different,
|
|
|
|
IFS=. read a b c d <<< "%version"
|
|
|
|
if [ "%tarversion" != $(printf "%1d%02d%02d%02d" $a $b $c $d) ]
|
|
|
|
then
|
|
|
|
echo "Version %version does not match tarversion %tarversion."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-03-15 15:57:36 +01:00
|
|
|
%autosetup -p0 -n sqlite-src-%{tarversion} -a2
|
2020-01-21 08:56:37 +01:00
|
|
|
|
2023-11-22 18:34:30 +01:00
|
|
|
rm -v sqlite-doc-%{docversion}/releaselog/current.html
|
|
|
|
ln -sv `echo %{docversion} | sed "s/\./_/g"`.html sqlite-doc-%{docversion}/releaselog/current.html
|
2017-08-30 12:34:18 +02:00
|
|
|
find -type f -name sqlite.css~ -delete
|
2023-11-22 18:34:30 +01:00
|
|
|
cmp sqlite-doc-%{docversion}/fileformat{,2}.html && ln -sf fileformat.html sqlite-doc-%{docversion}/fileformat2.html
|
2008-01-14 10:18:35 +01:00
|
|
|
|
|
|
|
%build
|
2022-03-16 19:44:06 +01:00
|
|
|
export TCLLIBDIR=%tcl_archdir/sqlite%version
|
2020-01-21 08:56:37 +01:00
|
|
|
export LIBS="$LIBS -lm %{?with_icu:-licuuc -licui18n}"
|
2016-01-07 15:08:29 +01:00
|
|
|
export CFLAGS="%{optflags} \
|
2016-03-25 09:53:27 +01:00
|
|
|
-DSQLITE_ENABLE_API_ARMOR \
|
2015-10-15 17:23:13 +02:00
|
|
|
-DSQLITE_ENABLE_COLUMN_METADATA \
|
2016-03-25 09:53:27 +01:00
|
|
|
-DSQLITE_ENABLE_DBSTAT_VTAB \
|
|
|
|
-DSQLITE_ENABLE_HIDDEN_COLUMNS \
|
2018-07-04 11:26:58 +02:00
|
|
|
-DSQLITE_ENABLE_FTS3 \
|
2015-10-15 17:23:13 +02:00
|
|
|
-DSQLITE_ENABLE_FTS4 \
|
2016-03-07 15:02:44 +01:00
|
|
|
-DSQLITE_ENABLE_FTS5 \
|
2020-01-21 08:56:37 +01:00
|
|
|
%if %{with icu}
|
|
|
|
-DSQLITE_ENABLE_ICU \
|
|
|
|
%endif
|
2015-10-15 17:23:13 +02:00
|
|
|
-DSQLITE_ENABLE_JSON1 \
|
2016-03-25 09:53:27 +01:00
|
|
|
-DSQLITE_ENABLE_RBU \
|
|
|
|
-DSQLITE_ENABLE_RTREE \
|
2018-06-07 13:00:01 +02:00
|
|
|
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
|
2016-03-25 09:53:27 +01:00
|
|
|
-DSQLITE_SOUNDEX \
|
|
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
|
|
|
|
-DSQLITE_SECURE_DELETE \
|
2021-03-19 17:18:37 +01:00
|
|
|
-DSQLITE_ENABLE_MATH_FUNCTIONS \
|
2024-04-18 10:29:52 +02:00
|
|
|
-DSQLITE_STRICT_SUBTYPE=1 \
|
2015-10-15 17:23:13 +02:00
|
|
|
"
|
2017-06-16 09:20:49 +02:00
|
|
|
%configure \
|
|
|
|
--disable-static \
|
2018-06-11 16:45:59 +02:00
|
|
|
--enable-readline \
|
2018-07-04 11:26:58 +02:00
|
|
|
--enable-fts3 \
|
2018-06-11 16:45:59 +02:00
|
|
|
--enable-fts4 \
|
|
|
|
--enable-fts5 \
|
|
|
|
--enable-update-limit \
|
|
|
|
--enable-rtree
|
2020-06-20 13:26:28 +02:00
|
|
|
%make_build sqlite3.c
|
|
|
|
%make_build
|
2008-01-14 10:18:35 +01:00
|
|
|
|
2022-03-16 19:44:06 +01:00
|
|
|
%if %{with check}
|
2018-06-29 15:06:55 +02:00
|
|
|
%check
|
2020-06-20 13:26:28 +02:00
|
|
|
%make_build test
|
2022-03-16 19:44:06 +01:00
|
|
|
%endif
|
2018-06-29 15:06:55 +02:00
|
|
|
|
2008-01-14 10:18:35 +01:00
|
|
|
%install
|
2017-06-16 09:20:49 +02:00
|
|
|
%make_install
|
2022-03-16 19:44:06 +01:00
|
|
|
#mkdir -p %{buildroot}/%{_mandir}/man{1,n}/
|
|
|
|
install -Dp -m 0644 -t %{buildroot}/%{_mandir}/man1 sqlite3.1
|
|
|
|
install -Dp -m 0644 -t %{buildroot}/%{_mandir}/mann autoconf/tea/doc/sqlite3.n
|
2018-06-29 15:06:55 +02:00
|
|
|
# tcl bindings are provided by tcl itself
|
2022-03-16 19:44:06 +01:00
|
|
|
#rm -rf %{buildroot}%{_libdir}/tcl/tcl8.?/sqlite3*
|
2016-01-07 15:08:29 +01:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2008-01-14 10:18:35 +01:00
|
|
|
|
|
|
|
%post -n libsqlite3-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libsqlite3-0 -p /sbin/ldconfig
|
2016-08-02 14:04:29 +02:00
|
|
|
|
2008-01-14 10:18:35 +01:00
|
|
|
%files
|
2016-01-07 15:08:29 +01:00
|
|
|
%{_bindir}/sqlite3
|
2018-06-06 20:59:40 +02:00
|
|
|
%{_mandir}/man1/sqlite3.1%{?ext_man}
|
2008-01-14 10:18:35 +01:00
|
|
|
|
|
|
|
%files -n libsqlite3-0
|
2017-06-16 09:20:49 +02:00
|
|
|
%{_libdir}/libsqlite3.so.*
|
2008-01-14 10:18:35 +01:00
|
|
|
|
|
|
|
%files devel
|
2017-06-16 09:20:49 +02:00
|
|
|
%{_includedir}/sqlite3.h
|
|
|
|
%{_includedir}/sqlite3ext.h
|
|
|
|
%{_libdir}/libsqlite3.so
|
2016-01-07 15:08:29 +01:00
|
|
|
%{_libdir}/pkgconfig/sqlite3.pc
|
2008-01-14 10:18:35 +01:00
|
|
|
|
2022-03-16 19:44:06 +01:00
|
|
|
%files tcl
|
|
|
|
%tcl_archdir/*
|
|
|
|
%doc %_mandir/mann/*
|
|
|
|
|
2014-02-13 11:47:47 +01:00
|
|
|
%files doc
|
2023-11-22 18:34:30 +01:00
|
|
|
%doc sqlite-doc-%{docversion}/*
|
2014-02-13 11:47:47 +01:00
|
|
|
|
2008-01-14 10:18:35 +01:00
|
|
|
%changelog
|