pkgname=cyrus-sasl pkgver=2.1.28 pkgrel=1 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library" arch=('x86_64') url="https://www.cyrusimap.org/sasl/" license=('BSD-3-Clause-Attribution') depends=('glibc' 'libxcrypt' 'lmdb' 'openssl' 'systemd') backup=(etc/conf.d/saslauthd) install=${pkgname}.install source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz saslauthd saslauthd.conf saslauthd.service) sha256sums=(7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c 76d3dc6548dc29a80538ae660ce1c0f3e79016fe54bca8f19adcdfbde8a950ab 3349d9588ac1553948404c38e2f740b0ad85a6c64850466b5569d7f295c14e0b a2f621dbbbe2e67bc1a11cd0363772e48ebb9e0c6a1d720fe793f173c5c90805) prepare() { cd ${pkgname}-${pkgver} sed '/saslint/a #include ' -i lib/saslutil.c sed '/plugin_common/a #include ' -i plugins/cram.c } build() { cd ${pkgname}-${pkgver} local configure_args=( --sysconfdir=/etc --enable-auth-sasldb --with-dblib=lmdb --with-dbpath=/var/lib/sasl/sasldb2 --with-sphinx-build=no --with-saslauthd=/var/run/saslauthd ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html install -vm644 saslauthd/LDAP_SASLAUTHD ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} install -vm644 doc/legacy/*.html ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html install -vdm700 ${pkgdir}/var/lib/sasl install -vDm644 ${srcdir}/saslauthd ${pkgdir}/etc/default/saslauthd install -vDm644 ${srcdir}/saslauthd.conf ${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf install -vDm644 ${srcdir}/saslauthd.service ${pkgdir}/usr/lib/systemd/system/saslauthd.service }