sqlite3/sqlite3.spec

190 lines
5.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package sqlite3
#
# Copyright (c) 2021 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define oname sqlite
%define tarversion 3360000
%bcond_with icu
Name: sqlite3
Version: 3.36.0
Release: 0
Summary: Embeddable SQL Database Engine
License: SUSE-Public-Domain
Group: Productivity/Databases/Servers
URL: https://www.sqlite.org/
Source0: https://www.sqlite.org/2021/sqlite-src-%{tarversion}.zip
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
Source1: baselibs.conf
Source2: https://www.sqlite.org/2021/sqlite-doc-%{tarversion}.zip
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: tcl-devel
BuildRequires: unzip
%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
BuildRequires: pkgconfig(zlib)
%endif
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
Provides: %{oname} = %{version}
Obsoletes: %{oname} < %{version}
%if %{with icu}
BuildRequires: libicu-devel
%endif
%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
Group: Development/Libraries/C and C++
Requires: glibc-devel
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
Requires: libsqlite3-0 = %{version}
Suggests: %{name}-doc
Provides: %{oname}-devel = %{version}
Obsoletes: %{oname}-devel < %{version}
%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.
%package doc
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
Summary: Documentation for %{name}
Group: Documentation/Other
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
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
%{_docdir}/%{name}-doc.
%prep
%setup -q -n sqlite-src-%{tarversion} -a2
rm -v sqlite-doc-%{tarversion}/releaselog/current.html
ln -sv `echo %{version} | sed "s/\./_/g"`.html sqlite-doc-%{tarversion}/releaselog/current.html
find -type f -name sqlite.css~ -delete
cmp sqlite-doc-%{tarversion}/fileformat{,2}.html && ln -sf fileformat.html sqlite-doc-%{tarversion}/fileformat2.html
%build
export LIBS="$LIBS -lm %{?with_icu:-licuuc -licui18n}"
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
export CFLAGS="%{optflags} \
-DSQLITE_ENABLE_API_ARMOR \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_HIDDEN_COLUMNS \
-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS5 \
%if %{with icu}
-DSQLITE_ENABLE_ICU \
%endif
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_RBU \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
-DSQLITE_SOUNDEX \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_MATH_FUNCTIONS \
"
%configure \
--disable-static \
--disable-static-shell \
--enable-readline \
--enable-fts3 \
--enable-fts4 \
--enable-fts5 \
--enable-json1 \
--enable-update-limit \
--enable-rtree
%make_build sqlite3.c
%make_build
%check
%make_build test
%install
%make_install
mkdir -p %{buildroot}/%{_mandir}/man1/
install -Dpm 0644 sqlite3.1 \
%{buildroot}/%{_mandir}/man1/sqlite3.1
# tcl bindings are provided by tcl itself
rm -rf %{buildroot}%{_libdir}/tcl/tcl8.?/sqlite3*
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libsqlite3-0 -p /sbin/ldconfig
%postun -n libsqlite3-0 -p /sbin/ldconfig
%files
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
%{_bindir}/sqlite3
%{_mandir}/man1/sqlite3.1%{?ext_man}
%files -n libsqlite3-0
%{_libdir}/libsqlite3.so.*
%files devel
%{_includedir}/sqlite3.h
%{_includedir}/sqlite3ext.h
%{_libdir}/libsqlite3.so
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
%{_libdir}/pkgconfig/sqlite3.pc
%files doc
Accepting request 352452 from home:mimi_vx:branches:server:database - update to 3.10.0 - spec-cleaned * Added support for LIKE, GLOB, and REGEXP operators on virtual tables. * Added the colUsed field to sqlite3_index_info for use by the sqlite3_module.xBestIndex method. * Enhance the PRAGMA cache_spill statement to accept a 32-bit integer parameter which is the threshold below which cache spilling is prohibited. * On unix, if a symlink to a database file is opened, then the corresponding journal files are based on the actual filename, not the symlink name. * Added the "--transaction" option to sqldiff. * Added the sqlite3_db_cacheflush() interface. * Added the sqlite3_strlike() interface. * When using memory-mapped I/O map the database file read-only so that stray pointers and/or array overruns in the application cannot accidently modify the database file. * Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(), and sqlite3_snapshot_free() interfaces. These are subject to change or removal in a subsequent release. * Enhance the 'utc' modifier in the date and time functions so that it is a no-op if the date/time is known to already be in UTC. (This is not a compatibility break since the behavior has long been documented as "undefined" in that case.) * Added the json_group_array() and json_group_object() SQL functions in the json extension. * Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option. * Many small performance optimizations. + Enhancements to the command-line shell: * Added the ".changes ON|OFF" and ".vfsinfo" dot-commands. + Important fixes: * Fix inconsistent integer to floating-point comparison operations that could result in a corrupt index if the index is created on a table column that OBS-URL: https://build.opensuse.org/request/show/352452 OBS-URL: https://build.opensuse.org/package/show/server:database/sqlite3?expand=0&rev=138
2016-01-07 15:08:29 +01:00
%doc sqlite-doc-%{tarversion}/*
%changelog