Files
BMLFS/build-scripts/cyrus-sasl.build
2025-07-07 22:50:37 -05:00

75 lines
2.5 KiB
Bash

#! /bin/bash
# Cyrus SASL
# Source: https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: BerkeleyDB lmdb
# Optional: lmdb Linux-PAM krb5(MIT Kerberos V5) MariaDB/MySQL OpenJDK OpenLDAP PostgreSQL
# Optional: SQLite krb4 Dmalloc Pod::POM::View::Restructured Sphinx
export PVER="2.1.28"
# Apply patch from Chimera Linux
patch -Np1 -i ../patches/cyrus-sasl-chimera/cyrus-sasl-2.1.28-fix-configure-time-check.patch
autoreconf -fvi &&
# set the configure options
export CARGS="--sysconfdir=/etc "
export CARGS+="--enable-auth-sasldb "
export CARGS+="--with-dblib=lmdb "
export CARGS+="--disable-krb4 "
export CARGS+="--with-dbpath=/var/lib/sasl/sasldb2 "
export CARGS+="--with-saslauthd=/var/run/saslauthd "
export CARGS+="--with-sphinx-build=no "
export CARGS+="--enable-cram "
export CARGS+="--enable-digest "
export CARGS+="--enable-plain "
export CARGS+="--enable-anon "
export CARGS+="--enable-login "
export CARGS+="--enable-gssapi "
export CARGS+="--disable-otp "
export CARGS+="--disable-srp "
export CARGS+="--disable-srp-setpass "
export CARGS+="--with-devrandom=/dev/random "
export CARGS+="--with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 "
# Configure source
./configure --prefix=/usr $CARGS
read -p "Compile?" && make -j1 &&
unset CARGS
sudo -S make DESTDIR=$BUILD install &&
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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
cyrus-sasl: cyrus-sasl (Simple Authentication and Security Layer)
cyrus-sasl:
cyrus-sasl: This is the Cyrus SASL library. Cyrus SASL is used by mail programs
cyrus-sasl: on the client or server side to provide authentication and
cyrus-sasl: authorization services. See RFC 2222 for more information.
cyrus-sasl:
cyrus-sasl:
cyrus-sasl:
cyrus-sasl:
cyrus-sasl:
cyrus-sasl:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/cyrus-sasl-$PVER-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*