-AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ \
+ @FTS5_FLAGS@ \
+ @JSON1_FLAGS@ \
+ @SESSION_FLAGS@ \
+ -DSQLITE_ENABLE_FTS3 \
+ -DSQLITE_ENABLE_RTREE \
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_ENABLE_MEMORY_MANAGEMENT \
+ -DSQLITE_DEFAULT_AUTOVACUUM=1 \
+ -DSQLITE_DEFAULT_PAGE_SIZE=4096 \
+ -Dfdatasync=fdatasync \
+ -DSQLITE_TIZEN_FEATURE \
+ -DSQLITE_TEMP_STORE=2 \
+ -DHAVE_USLEEP=1 \
+ -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=4194304 \
+ -DSQLITE_DEFAULT_FILE_FORMAT=4 \
+ -DSQLITE_POWERSAFE_OVERWRITE=1 \
+ -DSQLITE_ENABLE_ATOMIC_WRITE
lib_LTLIBRARIES = libsqlite3.la
libsqlite3_la_SOURCES = sqlite3.c
--- /dev/null
+Name: sqlite
+Version: 3.18.0
+Release: 0
+License: Public-Domain
+%define tarversion 3180000
+Summary: Embeddable SQL Database Engine
+Url: http://www.sqlite.org/
+Group: System/Database
+Source0: sqlite-autoconf-%tarversion.tar.gz
+Source1: baselibs.conf
+Source1001: sqlite.manifest
+BuildRequires: readline-devel
+BuildRequires: pkgconfig(pkg-config)
+Requires: libsqlite = %{version}
+Provides: sqlite3
+
+%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 libsqlite
+Summary: Shared libraries for the Embeddable SQL Database Engine
+Group: System/Database
+Provides: libsqlit3
+
+%description -n libsqlite
+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
+Requires: glibc-devel
+Requires: libsqlite = %{version}
+Requires: sqlite
+Provides: sqlite3-devel = %{version}
+Obsoletes: sqlite3-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.
+
+%prep
+%setup -q -n sqlite-autoconf-%tarversion
+cp %{SOURCE1001} .
+
+%build
+CFLAGS=`echo %{optflags} |sed -e 's/-ffast-math//g'`
+CFLAGS+=" -fPIE"
+LDFLAGS+=" -pie"
+%{?asan:CFLAGS+=" -lpthread -ldl "}
+chmod +x autogen.sh
+%autogen
+%configure -disable-dependency-tracking \
+ --enable-shared=yes \
+ --enable-static=no \
+ --enable-threadsafe \
+ --enable-fts5
+
+make
+
+%install
+%make_install
+
+%post -n libsqlite -p /sbin/ldconfig
+
+%postun -n libsqlite -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_bindir}/sqlite3
+
+%files -n libsqlite
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libsqlite*.so.*
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_includedir}/*.h
+%{_libdir}/libsqlite*.so
+%{_libdir}/pkgconfig/sqlite3.pc
+
+%docs_package