From 3b520000c9151270484fe639611b1b6dd42e2b84 Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Thu, 31 Oct 2024 20:44:41 +0800 Subject: [PATCH] libsasl 2.1.28-1 --- PKGBUILD | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..db491bc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +# 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 +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 ' -i lib/saslutil.c + sed '/plugin_common/a #include ' -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* +}