cyrus-sasl/PKGBUILD

110 lines
4.3 KiB
Bash
Raw Permalink Normal View History

2024-05-12 17:57:30 +08:00
# 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>
2024-10-31 22:00:28 +08:00
pkgname=(cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-ldap)
pkgbase=cyrus-sasl
2024-05-12 17:57:30 +08:00
pkgver=2.1.28
2024-10-31 22:00:28 +08:00
pkgrel=3
2024-05-12 17:57:30 +08:00
pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library"
arch=('x86_64')
url="https://www.cyrusimap.org/sasl/"
2024-10-31 22:00:28 +08:00
license=('BSD-3-Clause-Attribution')
makedepends=(
'gdbm'
'glibc'
'krb5'
'libldap'
"libsasl=${pkgver}"
'openssl'
'libxcrypt'
'linux-pam'
)
source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz
saslauthd.conf.d
saslauthd.service)
2024-05-12 17:57:30 +08:00
sha256sums=(7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c
2024-10-31 22:00:28 +08:00
6a5b11f42ae75b7a9a8ec0f05706a2aef682a0853857c80c3a1b59f1aedcde25
7b21ce969c1c10641fa7511db18a27d06ef0fa26d7f08bf0f796f266cf791ea7)
prepare() {
cd ${pkgbase}-${pkgver}
sed '/saslint/a #include <time.h>' -i lib/saslutil.c
sed '/plugin_common/a #include <time.h>' -i plugins/cram.c
}
2024-05-12 17:57:30 +08:00
build() {
2024-10-31 22:00:28 +08:00
cd ${pkgbase}-${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-gssapi \
--enable-ldapdb \
--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=/run/saslauthd \
--with-sqlite3=/usr/lib64
2024-05-12 17:57:30 +08:00
2024-10-31 22:00:28 +08:00
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
2024-05-12 17:57:30 +08:00
make
}
2024-10-31 22:00:28 +08:00
package_cyrus-sasl() {
pkgdesc="Cyrus saslauthd SASL authentication daemon"
depends=('gdbm' 'glibc' 'krb5' 'libldap' "libsasl=${pkgver}" 'libxcrypt' 'openssl' 'linux-pam')
backup=(etc/conf.d/saslauthd)
cd ${pkgbase}-${pkgver}
make -C saslauthd DESTDIR=${pkgdir} install
make -C saslauthd DESTDIR=${pkgdir} install-data-local
2024-05-12 17:57:30 +08:00
2024-10-31 22:00:28 +08:00
install -vDm 644 ${srcdir}/saslauthd.conf.d ${pkgdir}/etc/conf.d/saslauthd
install -vDm 644 ${srcdir}/saslauthd.service -t ${pkgdir}/usr/lib/systemd/system/
}
package_cyrus-sasl-gssapi() {
pkgdesc="GSSAPI authentication mechanism for Cyrus SASL"
depends=('glibc' 'krb5' "libsasl=${pkgver}")
cd ${pkgbase}-${pkgver}
install -vdm 755 ${pkgdir}/usr/lib64/sasl2
cp -av plugins/.libs/libgs{,sapiv}2.so* ${pkgdir}/usr/lib64/sasl2/
}
package_cyrus-sasl-ldap() {
pkgdesc="ldapdb auxprop module for Cyrus SASL"
depends=('glibc' 'libldap' "libsasl=${pkgver}")
2024-05-12 17:57:30 +08:00
2024-10-31 22:00:28 +08:00
cd ${pkgbase}-${pkgver}
2024-05-12 17:57:30 +08:00
2024-10-31 22:00:28 +08:00
install -vdm 755 ${pkgdir}/usr/lib64/sasl2
cp -av plugins/.libs/libldapdb.so* ${pkgdir}/usr/lib64/sasl2/
2024-05-12 17:57:30 +08:00
}