2022-03-20 13:19:37 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
2022-04-29 21:55:53 +02:00
# Maintainer : Joe Bo Run <joborun@disroot.org>
2022-03-20 13:19:37 +01:00
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
2022-04-29 21:55:53 +02:00
# Website : https://pozol.eu
2022-03-20 13:19:37 +01:00
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase = "sqlite"
pkgname = ( 'sqlite' 'sqlite-tcl' 'sqlite-analyzer' 'lemon' 'sqlite-doc' )
2024-01-17 12:36:40 +01:00
_srcver = 3450000
2023-11-27 02:38:07 +01:00
_docver = ${ _srcver }
#_docver=3440000
2024-01-17 12:36:40 +01:00
pkgver = 3.45.0
pkgrel = 01
2022-03-20 13:19:37 +01:00
pkgdesc = "A C library that implements an SQL database engine"
url = "https://www.sqlite.org/"
makedepends = ( 'tcl' 'readline' 'zlib' )
2022-08-13 01:49:04 +02:00
#options=('!emptydirs' 'debug') ## uncomment this to produce the debug pkg
options = ( '!emptydirs' )
2024-01-17 12:36:40 +01:00
source = ( https://www.sqlite.org/2024/sqlite-src-${ _srcver } .zip
https://www.sqlite.org/2024/sqlite-doc-${ _docver } .zip
2022-03-20 13:19:37 +01:00
sqlite-lemon-system-template.patch
license.txt)
# upstream now switched to sha3sums - currently not supported by makepkg
prepare( ) {
cd sqlite-src-$_srcver
# patch taken from Fedora
# https://src.fedoraproject.org/rpms/sqlite/blob/master/f/sqlite.spec
patch -Np1 -i ../sqlite-lemon-system-template.patch
#autoreconf -vfi
}
build( ) {
2023-09-11 22:26:04 +02:00
# this uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS = " ${ CFLAGS /_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2 } "
export CXXFLAGS = " ${ CXXFLAGS /_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2 } "
2023-11-27 02:38:07 +01:00
2022-03-20 13:19:37 +01:00
export CPPFLAGS = " $CPPFLAGS \
-DSQLITE_ENABLE_COLUMN_METADATA= 1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_DBSTAT_VTAB= 1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER= 1 \
2022-12-03 13:04:17 +01:00
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
2022-03-20 13:19:37 +01:00
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_STMTVTAB \
2023-11-27 02:38:07 +01:00
-DSQLITE_ENABLE_STAT4 \
2022-03-20 13:19:37 +01:00
-DSQLITE_MAX_VARIABLE_NUMBER= 250000 \
-DSQLITE_MAX_EXPR_DEPTH= 10000 \
-DSQLITE_ENABLE_MATH_FUNCTIONS"
# build sqlite
cd sqlite-src-$_srcver
./configure --prefix= /usr \
--disable-static \
--enable-fts3 \
--enable-fts4 \
--enable-fts5 \
--enable-rtree \
TCLLIBDIR = /usr/lib/sqlite$pkgver
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
# build additional tools
make showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
}
package_sqlite( ) {
pkgdesc = "A C library that implements an SQL database engine"
2023-08-24 23:40:43 +02:00
depends = ( 'readline' 'zlib' 'glibc' )
2022-08-13 01:49:04 +02:00
provides = ( " sqlite3= $pkgver " 'libsqlite3.so' )
2022-03-20 13:19:37 +01:00
replaces = ( "sqlite3" )
cd sqlite-src-$_srcver
make DESTDIR = " ${ pkgdir } " install
install -m755 showdb showjournal showstat4 showwal sqldiff " ${ pkgdir } " /usr/bin/
# install manpage
install -m755 -d " ${ pkgdir } " /usr/share/man/man1
install -m644 sqlite3.1 " ${ pkgdir } " /usr/share/man/man1/
2024-01-17 12:36:40 +01:00
# license
install -D -m644 " ${ srcdir } " /license.txt " ${ pkgdir } " /usr/share/licenses/${ pkgname } /license.txt
2022-03-20 13:19:37 +01:00
# split out tcl extension
mkdir " $srcdir " /tcl
mv " $pkgdir " /usr/lib/sqlite* " $srcdir " /tcl
}
package_sqlite-tcl( ) {
pkgdesc = "sqlite Tcl Extension Architecture (TEA)"
2023-08-24 23:40:43 +02:00
depends = ( 'sqlite' 'glibc' )
2022-03-20 13:19:37 +01:00
provides = ( " sqlite3-tcl= $pkgver " )
replaces = ( "sqlite3-tcl" )
install -m755 -d " ${ pkgdir } " /usr/lib
mv " $srcdir " /tcl/* " ${ pkgdir } " /usr/lib
# install manpage
install -m755 -d " ${ pkgdir } " /usr/share/man/mann
install -m644 " ${ srcdir } " /sqlite-src-$_srcver /autoconf/tea/doc/sqlite3.n " ${ pkgdir } " /usr/share/man/mann/
2024-01-17 12:36:40 +01:00
# license
install -D -m644 " ${ srcdir } " /license.txt " ${ pkgdir } " /usr/share/licenses/${ pkgname } /license.txt
2022-03-20 13:19:37 +01:00
}
package_sqlite-analyzer( ) {
pkgdesc = "An analysis program for sqlite3 database files"
2023-08-24 23:40:43 +02:00
depends = ( 'sqlite' 'tcl' 'glibc' )
2022-03-20 13:19:37 +01:00
cd sqlite-src-$_srcver
install -m755 -d " ${ pkgdir } " /usr/bin
install -m755 sqlite3_analyzer " ${ pkgdir } " /usr/bin/
2024-01-17 12:36:40 +01:00
# license
install -D -m644 " ${ srcdir } " /license.txt " ${ pkgdir } " /usr/share/licenses/${ pkgname } /license.txt
2022-03-20 13:19:37 +01:00
}
package_lemon( ) {
# https://www.sqlite.org/lemon.html
pkgdesc = "A parser generator"
depends = ( 'glibc' )
cd sqlite-src-$_srcver
# ELF file ('usr/bin/lemon') lacks FULL RELRO, check LDFLAGS. - no fix found so far
install -Dm755 lemon ${ pkgdir } /usr/bin/lemon
install -Dm644 lempar.c ${ pkgdir } /usr/share/lemon/lempar.c
mkdir -p " ${ pkgdir } " /usr/share/doc/${ pkgname }
cp ../sqlite-doc-${ _docver } /lemon.html " ${ pkgdir } " /usr/share/doc/${ pkgname } /
2024-01-17 12:36:40 +01:00
# license
install -D -m644 " ${ srcdir } " /license.txt " ${ pkgdir } " /usr/share/licenses/${ pkgname } /license.txt
2022-03-20 13:19:37 +01:00
}
package_sqlite-doc( ) {
pkgdesc = "most of the static HTML files that comprise this website, including all of the SQL Syntax and the C/C++ interface specs and other miscellaneous documentation"
#arch=('any') - not yet supported
provides = ( " sqlite3-doc= $pkgver " )
replaces = ( "sqlite3-doc" )
cd sqlite-doc-${ _docver }
mkdir -p " ${ pkgdir } " /usr/share/doc/${ pkgbase }
cp -R * " ${ pkgdir } " /usr/share/doc/${ pkgbase } /
2024-01-17 12:36:40 +01:00
# license
install -D -m644 " ${ srcdir } " /license.txt " ${ pkgdir } " /usr/share/licenses/${ pkgname } /license.txt
2022-03-20 13:19:37 +01:00
rm " ${ pkgdir } " /usr/share/doc/${ pkgbase } /lemon.html
}
2023-03-11 20:41:39 +01:00
#---- arch license gpg-key & sha256sums ----
arch = ( x86_64)
2022-03-20 13:19:37 +01:00
2024-01-17 12:36:40 +01:00
license = ( 'LicenseRef-Sqlite' )
2022-03-20 13:19:37 +01:00
2024-01-17 12:36:40 +01:00
sha256sums = ( 14dc2db487e8563ce286a38949042cb1e87ca66d872d5ea43c76391004941fe2 # sqlite-src-3450000.zip
c2fb268ef41cfb1270b54511c19ae3164fc18d0a893c1b143dd2655e00c00104 # sqlite-doc-3450000.zip
2022-11-17 09:21:50 +01:00
55746d93b0df4b349c4aa4f09535746dac3530f9fd6de241c9f38e2c92e8ee97 # sqlite-lemon-system-template.patch
2022-03-28 00:07:19 +02:00
4e57d9ac979f1c9872e69799c2597eeef4c6ce7224f3ede0bf9dc8d217b1e65d) # license.txt
2022-08-01 23:55:14 +02:00
2024-01-17 12:36:40 +01:00
## 7ad0da8abcc732208ab8ac1230bb7fb67246adc86dedabcd6c73888136c7f365 lemon-3.45.0-01-x86_64.pkg.tar.lz
## 5ceebdb3a68a6af4603646b6ac9d0f79da71d28bc5dc46db2e95f8ec290290d8 sqlite-3.45.0-01-x86_64.pkg.tar.lz
## 374644c7150ddc40fc3d0104b8c31388b5f24314a3dfa74c564fe4514bc0b170 sqlite-analyzer-3.45.0-01-x86_64.pkg.tar.lz
## c3a7ebde16c202143255b81a9682d4f75ed057cf8cdef1212af3bf62b87a046f sqlite-doc-3.45.0-01-x86_64.pkg.tar.lz
## 669374fbc6bdb27cf63d7713d9bc06aeda69c63141f1cd95b0e2bb5f11296e2f sqlite-tcl-3.45.0-01-x86_64.pkg.tar.lz
2023-03-11 20:41:39 +01:00