1 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 # This package spans multiple repositories.
4 # Always build from cyrus-sasl/trunk and merge changes to libsasl/trunk.
7 pkgname=('cyrus-sasl' 'cyrus-sasl-gssapi' 'cyrus-sasl-ldap' 'cyrus-sasl-sql')
11 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library"
13 url="https://www.cyrusimap.org/sasl/"
15 options=('!makeflags')
16 makedepends=('postgresql-libs' 'mariadb-libs' 'libldap' 'krb5' 'openssl' 'sqlite')
17 source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-${pkgver}/cyrus-sasl-${pkgver}.tar.gz{,.sig}
18 0003-Update-saslauthd.conf-location-in-documentation.patch
19 0006-Enable-autoconf-maintainer-mode.patch
20 0010-Update-required-libraries-when-ld-as-needed-is-used.patch
21 0013-Don-t-use-la-files-for-opening-plugins.patch
22 0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
23 0022-Fix-keytab-option-for-MIT-Kerberos.patch
24 0032-Add-with_pgsql-include-postgresql-to-include-path.patch
30 sha256sums=('26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5'
32 '9919c81196701d11a3a77e2573a541489ad9ab42a4c50eb7d19edfb37713c604'
33 '7bd2b2af36c061e92f69944a18e2c122aea0d2b21773f5ea47bb6209f13d0812'
34 '8e22cb6ac58208f191b1eb19aac602c1bf49708f2a3b2e3de5f5b2c1e2467906'
35 'bbee401c01dc6942710e0c1285091fcd98588bf636b52f24ed0e3b04039b748b'
36 'a953c79c585d579f25135de0fe807d6da1fddccbd5b66a9606fb6390c12c7e31'
37 '1a0ae7bd722d57feb6fab12c05eb1922982c68bd9be1c165d405954012e6634f'
38 '3c375f8755fdbd98a21c4ee195bebbd2a146901fee327e4dd6cfde7a4dcba7c3'
39 '03a57cbcec85602fb8e39b7c8a3ff1a22d2c20a28e771b8b326a570d733bf432'
40 '91cb2026e7f41374ec181809c862bbfaf4e4b3346dc8294285718d2dd17101a5'
41 '5c6453050a5f594ca1d53baf3a6188d8f3cdc7a28467ad7c844ad51f663dae9a'
42 'fa57b4f374ae633633091b1c8b44e1e0be814e4fddbfa75f16eb3dd1f16b8640'
43 '16ca1a4185847b0c6c70ef6c7c314cb466f698d3ed02185a5f50e8179822f024')
44 validpgpkeys=('829F339F8C296FE80F409D93E3D7C118C7B9F46A')
48 patch -Np1 -i ../0003-Update-saslauthd.conf-location-in-documentation.patch
49 patch -Np1 -i ../0006-Enable-autoconf-maintainer-mode.patch
50 patch -Np1 -i ../0010-Update-required-libraries-when-ld-as-needed-is-used.patch
51 patch -Np1 -i ../0013-Don-t-use-la-files-for-opening-plugins.patch
52 patch -Np1 -i ../0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
53 patch -Np1 -i ../0022-Fix-keytab-option-for-MIT-Kerberos.patch
54 patch -Np1 -i ../0032-Add-with_pgsql-include-postgresql-to-include-path.patch
55 patch -Np1 -i ../gdbm-errno.patch
56 patch -p1 -i ../autoconf-2.70.patch # Fix GCC-SPNEGO build with recent autoconf
57 cp -a saslauthd/saslauthd.mdoc saslauthd/saslauthd.8
61 export CFLAGS="$CFLAGS -fPIC"
64 rm -f config/config.guess config/config.sub
65 rm -f config/ltconfig config/ltmain.sh config/libtool.m4
73 ./configure --prefix=/usr \
75 --mandir=/usr/share/man \
76 --infodir=/usr/share/info \
85 --disable-srp-setpass \
88 --enable-auth-sasldb \
96 --with-pgsql=/usr/lib \
97 --with-sqlite3=/usr/lib \
99 --disable-macos-framework \
101 --with-saslauthd=/var/run/saslauthd \
104 --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 \
106 --with-devrandom=/dev/urandom
107 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
112 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library"
114 conflicts=('cyrus-sasl-plugins')
116 cd cyrus-sasl-$pkgver
117 make DESTDIR="$pkgdir" install-pkgconfigDATA
118 for dir in include lib sasldb plugins utils; do
120 make DESTDIR="${pkgdir}" install
123 rm -f "${pkgdir}"/usr/lib/sasl2/libsql.so*
124 rm -f "${pkgdir}"/usr/lib/sasl2/libgssapiv2.so*
125 rm -f "${pkgdir}"/usr/lib/sasl2/libldapdb.so*
126 rm -f "${pkgdir}"/usr/lib/sasl2/libgs2.so*
127 install -m755 -d "${pkgdir}/usr/share/licenses/libsasl"
128 install -m644 COPYING "${pkgdir}/usr/share/licenses/libsasl/"
131 package_cyrus-sasl() {
132 depends=("libsasl=${pkgver}" 'krb5' 'pam' 'gdbm')
133 pkgdesc="Cyrus saslauthd SASL authentication daemon"
134 backup=('etc/conf.d/saslauthd')
136 cd cyrus-sasl-$pkgver/saslauthd
137 make DESTDIR="${pkgdir}" install
138 install -Dm644 "${srcdir}/saslauthd.conf.d" "${pkgdir}/etc/conf.d/saslauthd"
139 install -Dm644 "${srcdir}/saslauthd.service" "${pkgdir}/usr/lib/systemd/system/saslauthd.service"
140 install -Dm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf"
142 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl"
143 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl/"
146 package_cyrus-sasl-gssapi() {
147 pkgdesc="GSSAPI authentication mechanism for Cyrus SASL"
148 depends=("libsasl=${pkgver}" 'krb5')
149 replaces=('cyrus-sasl-plugins')
151 cd cyrus-sasl-$pkgver/plugins
152 install -m755 -d "${pkgdir}/usr/lib/sasl2"
153 cp -a .libs/libgssapiv2.so* "${pkgdir}/usr/lib/sasl2/"
154 cp -a .libs/libgs2.so* "${pkgdir}/usr/lib/sasl2/"
156 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi"
157 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi/"
160 package_cyrus-sasl-ldap() {
161 pkgdesc="ldapdb auxprop module for Cyrus SASL"
162 depends=("libsasl=${pkgver}" 'libldap')
163 replaces=('cyrus-sasl-plugins')
165 cd cyrus-sasl-$pkgver/plugins
166 install -m755 -d "${pkgdir}/usr/lib/sasl2"
167 cp -a .libs/libldapdb.so* "${pkgdir}/usr/lib/sasl2/"
169 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap"
170 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap/"
173 package_cyrus-sasl-sql() {
174 pkgdesc="SQL auxprop module for Cyrus SASL"
175 depends=("libsasl=${pkgver}" 'postgresql-libs' 'mariadb-libs' 'sqlite')
176 replaces=('cyrus-sasl-plugins')
178 cd cyrus-sasl-$pkgver/plugins
179 install -m755 -d "${pkgdir}/usr/lib/sasl2"
180 cp -a .libs/libsql.so* "${pkgdir}/usr/lib/sasl2/"
182 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-sql"
183 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-sql/"