mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-03 16:40:25 +00:00
100 lines
3.2 KiB
Bash
100 lines
3.2 KiB
Bash
#! /bin/bash
|
|
|
|
# SQLite 3.49.1
|
|
# Source: https://sqlite.org/2025/sqlite-autoconf-3490100.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: libedit and Unzip
|
|
|
|
# If optimizing, use these flags with GCC
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 -fstack-protector-strong "
|
|
export CFLAGS+="-fzero-call-used-regs=used "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
export PVER="3.49.1"
|
|
|
|
# If CPU byte order is Big Endian:
|
|
export CPUBO="-DSHA3_BYTEORDER=4321 -DSQLITE_BYTEORDER=4321"
|
|
|
|
# If CPU byte order is Little Endian:
|
|
export CPUBO="-DSHA3_BYTEORDER=1234 -DSQLITE_BYTEORDER=1234 "
|
|
|
|
# Define CPPFLAGS to use
|
|
export CPPF=" -DSQLITE_ENABLE_COLUMN_METADATA=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_DBSTAT_VTAB=1 "
|
|
export CPPF+="-DSQLITE_SECURE_DELETE=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_FTS3=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_FTS3_PARENTHESIS=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_FTS4=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_BATCH_ATOMIC_WRITE=1 "
|
|
export CPPF+="-DSQLITE_ENABLE_FTS3_TOKENIZER=1 "
|
|
export CPPF+="-DHAVE_FDATASYNC=1 "
|
|
export CPPF+=${CPUBO}
|
|
|
|
sed -i -e 's/ -ltinfo//g' configure
|
|
./configure --prefix=/usr \
|
|
--disable-static \
|
|
--enable-fts5 \
|
|
--enable-fts4 $BUILDTRUPLE \
|
|
CPPFLAGS=$CPPF && \
|
|
|
|
read -p "Compile?" && make -j2 &&
|
|
read -p "Package build?" &&
|
|
|
|
unset CPUBO
|
|
|
|
# If not using any package manager:
|
|
#sudo -S make install &&
|
|
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S mkdir -pv /BMAN/install && \
|
|
sudo -S mkdir -pv /BMAN/usr && \
|
|
sudo -S mv $BUILD/usr/share /BMAN/usr/ && \
|
|
|
|
cd $BUILD && sudo -S mkdir -v ${BUILD}/install
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description. Line
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
# on the right side marks the last column you can put a character in. You must
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':'.
|
|
|
|
|-----handy-ruler-------------------------------------------------------|
|
|
sqlite: SQLite (simple, self contained database engine)
|
|
sqlite:
|
|
sqlite: SQLite is a small C library that implements a self-contained,
|
|
sqlite: embeddable, zero-configuration SQL database engine.
|
|
sqlite:
|
|
sqlite: The SQLite distribution comes with a standalone command-line access
|
|
sqlite: program (sqlite) that can be used to administer an SQLite database
|
|
sqlite: and which serves as an example of how to use the SQLite library.
|
|
sqlite:
|
|
sqlite: Homepage: http://www.sqlite.org/
|
|
sqlite:
|
|
EOF
|
|
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/sqlite-$PVER-$PSUFFIX &&
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
sqlite-doc: Manuals for SQLite (simple, self contained database engine)
|
|
sqlite-doc:
|
|
sqlite-doc: A small C library that implements a self-contained, embeddable,
|
|
sqlite-doc: zero-configuration SQL database engine.
|
|
sqlite-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/sqlite-doc-$PVER-$NOPSUFFIX
|
|
sudo -S rm -rf /BMAN/*
|
|
sudo -S rm -rf ${BUILD}/*
|
|
|
|
|