File mingw64-sqlite.spec of Package mingw64-sqlite

#
# spec file for package mingw64-sqlite
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%define sqlite_version 3450100
%define sover 0
%define libname mingw64-libsqlite3-%{sover}

Name:           mingw64-sqlite
Version:        3.45.1
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/2024/sqlite-autoconf-%{sqlite_version}.tar.gz
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-zlib-devel
BuildRequires:  mingw64-filesystem
BuildRequires:  tcl
%_mingw64_package_header_debug
BuildArch:      noarch

%description
SQLite is a C library that implements an SQL database engine. A large
subset of SQL92 is supported. A complete database is stored in a
single disk file. The API is designed for convenience and ease of use.
Applications that link against SQLite can enjoy the power and
flexibility of an SQL database without the administrative hassles of
supporting a separate database server.

%package -n %{libname}
Summary:        Embeddable SQL database engine
Group:          Productivity/Databases/Clients
Provides:       mingw64-libsqlite = %version-%release
Obsoletes:      mingw64-libsqlite < %version-%release

%description -n %{libname}
SQLite is a C library that implements an SQL database engine. A large
subset of SQL92 is supported. A complete database is stored in a
single disk file. The API is designed for convenience and ease of use.
Applications that link against SQLite can enjoy the power and
flexibility of an SQL database without the administrative hassles of
supporting a separate database server.

%package devel
Summary:        Embeddable SQL database engine
Group:          Development/Libraries/C and C++
Provides:       mingw64-libsqlite-devel = %version-%release
Obsoletes:      mingw64-libsqlite-devel < %version-%release

%description devel
SQLite is a C library that implements an SQL database engine. A large
subset of SQL92 is supported. A complete database is stored in a
single disk file. The API is designed for convenience and ease of use.
Applications that link against SQLite can enjoy the power and
flexibility of an SQL database without the administrative hassles of
supporting a separate database server.

%_mingw64_debug_package

%prep
%setup -q -n sqlite-autoconf-%sqlite_version
%autopatch -p1

%build
MINGW64_CFLAGS=" -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_USE_MALLOC_H=1 -DSQLITE_USE_MSIZE=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1"
%_mingw64_configure \
    --disable-tcl \
    --enable-readline \
    --enable-rtree \
    --enable-json1 \
    --enable-session \
    --enable-shared \
    --disable-static
%_mingw64_make

%install
%_mingw64_make_install

%files
%_mingw64_bindir/sqlite3.exe
%_mingw64_mandir/man1/sqlite3.1%{?ext_man}

%files -n %{libname}
%_mingw64_bindir/libsqlite3-%{sover}.dll

%files devel
%_mingw64_libdir/libsqlite3.dll.a
%_mingw64_includedir/sqlite3.h
%_mingw64_includedir/sqlite3ext.h
%_mingw64_libdir/pkgconfig/sqlite3.pc

%changelog
openSUSE Build Service is sponsored by