summaryrefslogtreecommitdiff
path: root/system/sqlite/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 23:07:29 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 23:07:29 -0500
commitde24d0a46986d9103dd6c5dc90983402368d6b09 (patch)
tree5596d70ff77fa59465f496aac327dfa5ac3abf1c /system/sqlite/APKBUILD
parent3a41dac498c81720722568c3940f8e1703ed0109 (diff)
downloadpackages-de24d0a46986d9103dd6c5dc90983402368d6b09.tar.gz
packages-de24d0a46986d9103dd6c5dc90983402368d6b09.tar.bz2
packages-de24d0a46986d9103dd6c5dc90983402368d6b09.tar.xz
packages-de24d0a46986d9103dd6c5dc90983402368d6b09.zip
system/sqlite: bring in for tcl
Diffstat (limited to 'system/sqlite/APKBUILD')
-rw-r--r--system/sqlite/APKBUILD85
1 files changed, 85 insertions, 0 deletions
diff --git a/system/sqlite/APKBUILD b/system/sqlite/APKBUILD
new file mode 100644
index 000000000..d73ba82bc
--- /dev/null
+++ b/system/sqlite/APKBUILD
@@ -0,0 +1,85 @@
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=sqlite
+pkgver=3.24.0
+_a=${pkgver%%.*}
+_b=${pkgver#${_a}.}
+_b=${_b%%.*}
+_c=${pkgver#${_a}.${_b}.}
+_c=${_c%%.*}
+case $pkgver in
+ *.*.*.*)_d=${pkgver##*.};;
+ *.*.*) _d=0;;
+esac
+
+[ $_b -lt 10 ] && _b=0$_b
+[ $_c -lt 10 ] && _c=0$_c
+[ $_d -lt 10 ] && _d=0$_d
+_ver=${_a}${_b}${_c}${_d}
+
+pkgrel=0
+pkgdesc="C library that implements an SQL database engine"
+url="https://sqlite.org/"
+arch="all"
+license="Public-Domain"
+depends=""
+makedepends="readline-dev"
+source="http://www.sqlite.org/2018/$pkgname-autoconf-$_ver.tar.gz
+ license.txt"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
+
+_amalgamation="-DSQLITE_ENABLE_FTS4 \
+ -DSQLITE_ENABLE_FTS3_PARENTHESIS \
+ -DSQLITE_ENABLE_FTS5 \
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_SECURE_DELETE \
+ -DSQLITE_ENABLE_UNLOCK_NOTIFY \
+ -DSQLITE_ENABLE_RTREE \
+ -DSQLITE_USE_URI \
+ -DSQLITE_ENABLE_DBSTAT_VTAB \
+ -DSQLITE_MAX_VARIABLE_NUMBER=250000 \
+ -DSQLITE_ENABLE_JSON1"
+
+builddir="$srcdir/$pkgname-autoconf-$_ver"
+build() {
+ cd "$builddir"
+ export CFLAGS="$CFLAGS $_amalgamation"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-threadsafe \
+ --disable-static \
+ --enable-readline \
+ --enable-dynamic-extensions
+
+ # rpath removal
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make -j1 DESTDIR="$pkgdir" install
+ install -Dm0644 sqlite3.1 \
+ "$pkgdir"/usr/share/man/man1/sqlite3.1
+ install -Dm644 "$srcdir"/license.txt \
+ "$pkgdir"/usr/share/licenses/$pkgname/license.txt
+}
+
+libs() {
+ replaces="sqlite"
+ pkgdesc="Sqlite3 library"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+}
+
+sha512sums="eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878 sqlite-autoconf-3240000.tar.gz
+5bde14bec5bf18cc686b8b90a8b2324c8c6600bca1ae56431a795bb34b8b5ae85527143f3b5f0c845c776bce60eaa537624104cefc3a47b3820d43083f40c6e9 license.txt"