pkgname=sqlite pkgver=3.47.2 _pkgver=$(printf "%i%.2i%.2i%.2i" ${pkgver//./ }) pkgrel=1 pkgdesc="A C library that implements an SQL database engine" arch=('x86_64') url="https://www.sqlite.org/" license=('LicenseRef-Sqlite') makedepends=('readline' 'zlib') options=('!emptydirs') source=(https://sqlite.org/2024/sqlite-autoconf-${_pkgver}.tar.gz https://sqlite.org/2024/sqlite-doc-${_pkgver}.zip) sha256sums=(f1b2ee412c28d7472bc95ba996368d6f0cdcf00362affdadb27ed286c179540b 6dcca89a6749029fba81bc0f4188cbd4f78acb48d6a3eadc6d548af9117c3f41) build() { cd sqlite-autoconf-${_pkgver} export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" local configure_args=( --disable-static --enable-fts{4,5} TCLLIBDIR=/usr/lib64/${pkgname}${pkgver} CPPFLAGS="${CPPFLAGS} \ -DSQLITE_ENABLE_COLUMN_METADATA=1 \ -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ -DSQLITE_SECURE_DELETE=1 \ -DSQLITE_ENABLE_FTS3_TOKENIZER=1" ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd sqlite-autoconf-${_pkgver} make DESTDIR=${pkgdir} install install -v -m755 -d ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} cp -v -R ${srcdir}/sqlite-doc-${_pkgver}/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} }