libsasl/PKGBUILD
2024-10-31 20:44:41 +08:00

77 lines
3.2 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=libsasl
pkgver=2.1.28
pkgrel=1
pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library"
arch=('x86_64')
url="https://www.cyrusimap.org/sasl/"
license=('custom')
depends=('glibc' 'gdbm' 'openssl')
makedepends=('sqlite')
source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-${pkgver}/cyrus-sasl-${pkgver}.tar.gz)
sha256sums=(7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c)
prepare() {
cd cyrus-sasl-${pkgver}
sed '/saslint/a #include <time.h>' -i lib/saslutil.c
sed '/plugin_common/a #include <time.h>' -i plugins/cram.c
}
build() {
cd cyrus-sasl-${pkgver}
${CONFIGURE} \
--disable-krb4 \
--disable-macos-framework \
--disable-otp \
--disable-passdss \
--disable-srp \
--disable-srp-setpass \
--disable-static \
--enable-alwaystrue \
--enable-anon \
--enable-auth-sasldb \
--enable-checkapop \
--enable-cram \
--enable-digest \
--enable-login \
--enable-ntlm \
--enable-plain \
--enable-shared \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--with-dblib=gdbm \
--with-devrandom=/dev/urandom \
--with-configdir=/etc/sasl2:/etc/sasl:/usr/lib64/sasl2 \
--with-ldap \
--with-pam \
--with-saslauthd=/var/run/saslauthd \
--with-sqlite3=/usr/lib64
# prevent excessive overlinking by libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make -j1
}
package() {
cd cyrus-sasl-${pkgver}
make DESTDIR=${pkgdir} install-pkgconfigDATA
local _target
for _target in include lib sasldb plugins utils; do
make DESTDIR=${pkgdir} install -C ${_target}
done
# remove files provided by extra/cyrus-sasl
rm -fv ${pkgdir}/usr/lib64/sasl2/lib{gs2,gssapiv2,ldapdb,sql}.so*
}