#!/bin/sh

#shellcheck disable=SC2034
#shellcheck disable=SC2154
#shellcheck disable=SC2086

#ebs.formulae
ebsver=1

pkgname=sqlite3
pkgver=3.53.4
pkgsrc=https://www.sqlite.org/2026/sqlite-src-3530400.zip
pkgchecksum=sha256:d18fa15aec74d8c17e1463f861095adc01b5ad190256acb4f91d22f0368d232b
pkgdesc="a small, fast, self-contained SQL database engine"
pkgmaintainer="juanvel400 <me@juanvel400.com>"
pkglicense="blessing"
pkghomepage="https://www.sqlite.org"
pkgcheck=false
pkgdeps="musl"
pkgprovides="libsqlite3"

build() {
    CXX=false ./configure ${CONFIGUREFLAGS:-} \
        --prefix=/usr \
        --disable-static \
        --enable-shared \
        --disable-rpath \
        --soname=legacy \
        --fts5
    make
}

package() {
    "${1:-fakeroot}" make install DESTDIR="$pkgdir"
}
