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
29 sha256sums=('26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5'
31 '9919c81196701d11a3a77e2573a541489ad9ab42a4c50eb7d19edfb37713c604'
32 '7bd2b2af36c061e92f69944a18e2c122aea0d2b21773f5ea47bb6209f13d0812'
33 '8e22cb6ac58208f191b1eb19aac602c1bf49708f2a3b2e3de5f5b2c1e2467906'
34 'bbee401c01dc6942710e0c1285091fcd98588bf636b52f24ed0e3b04039b748b'
35 'a953c79c585d579f25135de0fe807d6da1fddccbd5b66a9606fb6390c12c7e31'
36 '1a0ae7bd722d57feb6fab12c05eb1922982c68bd9be1c165d405954012e6634f'
37 '3c375f8755fdbd98a21c4ee195bebbd2a146901fee327e4dd6cfde7a4dcba7c3'
38 '03a57cbcec85602fb8e39b7c8a3ff1a22d2c20a28e771b8b326a570d733bf432'
39 '5c6453050a5f594ca1d53baf3a6188d8f3cdc7a28467ad7c844ad51f663dae9a'
40 'fa57b4f374ae633633091b1c8b44e1e0be814e4fddbfa75f16eb3dd1f16b8640'
41 '16ca1a4185847b0c6c70ef6c7c314cb466f698d3ed02185a5f50e8179822f024')
42 validpgpkeys=('829F339F8C296FE80F409D93E3D7C118C7B9F46A')
46 patch -Np1 -i ../0003-Update-saslauthd.conf-location-in-documentation.patch
47 patch -Np1 -i ../0006-Enable-autoconf-maintainer-mode.patch
48 patch -Np1 -i ../0010-Update-required-libraries-when-ld-as-needed-is-used.patch
49 patch -Np1 -i ../0013-Don-t-use-la-files-for-opening-plugins.patch
50 patch -Np1 -i ../0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
51 patch -Np1 -i ../0022-Fix-keytab-option-for-MIT-Kerberos.patch
52 patch -Np1 -i ../0032-Add-with_pgsql-include-postgresql-to-include-path.patch
53 patch -Np1 -i ../gdbm-errno.patch
54 cp -a saslauthd/saslauthd.mdoc saslauthd/saslauthd.8
58 export CFLAGS="$CFLAGS -fPIC"
61 rm -f config/config.guess config/config.sub
62 rm -f config/ltconfig config/ltmain.sh config/libtool.m4
70 ./configure --prefix=/usr \
72 --mandir=/usr/share/man \
73 --infodir=/usr/share/info \
82 --disable-srp-setpass \
85 --enable-auth-sasldb \
93 --with-pgsql=/usr/lib \
94 --with-sqlite3=/usr/lib \
96 --disable-macos-framework \
98 --with-saslauthd=/var/run/saslauthd \
101 --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 \
103 --with-devrandom=/dev/urandom
104 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
109 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library"
111 conflicts=('cyrus-sasl-plugins')
113 cd cyrus-sasl-$pkgver
114 make DESTDIR="$pkgdir" install-pkgconfigDATA
115 for dir in include lib sasldb plugins utils; do
117 make DESTDIR="${pkgdir}" install
120 rm -f "${pkgdir}"/usr/lib/sasl2/libsql.so*
121 rm -f "${pkgdir}"/usr/lib/sasl2/libgssapiv2.so*
122 rm -f "${pkgdir}"/usr/lib/sasl2/libldapdb.so*
123 rm -f "${pkgdir}"/usr/lib/sasl2/libgs2.so*
124 install -m755 -d "${pkgdir}/usr/share/licenses/libsasl"
125 install -m644 COPYING "${pkgdir}/usr/share/licenses/libsasl/"
128 package_cyrus-sasl() {
129 depends=("libsasl=${pkgver}" 'krb5' 'pam')
130 pkgdesc="Cyrus saslauthd SASL authentication daemon"
131 backup=('etc/conf.d/saslauthd')
133 cd cyrus-sasl-$pkgver/saslauthd
134 make DESTDIR="${pkgdir}" install
135 install -Dm644 "${srcdir}/saslauthd.conf.d" "${pkgdir}/etc/conf.d/saslauthd"
136 install -Dm644 "${srcdir}/saslauthd.service" "${pkgdir}/usr/lib/systemd/system/saslauthd.service"
137 install -Dm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf"
139 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl"
140 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl/"
143 package_cyrus-sasl-gssapi() {
144 pkgdesc="GSSAPI authentication mechanism for Cyrus SASL"
145 depends=("libsasl=${pkgver}" 'krb5')
146 replaces=('cyrus-sasl-plugins')
148 cd cyrus-sasl-$pkgver/plugins
149 install -m755 -d "${pkgdir}/usr/lib/sasl2"
150 cp -a .libs/libgssapiv2.so* "${pkgdir}/usr/lib/sasl2/"
151 cp -a .libs/libgs2.so* "${pkgdir}/usr/lib/sasl2/"
153 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi"
154 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi/"
157 package_cyrus-sasl-ldap() {
158 pkgdesc="ldapdb auxprop module for Cyrus SASL"
159 depends=("libsasl=${pkgver}" 'libldap')
160 replaces=('cyrus-sasl-plugins')
162 cd cyrus-sasl-$pkgver/plugins
163 install -m755 -d "${pkgdir}/usr/lib/sasl2"
164 cp -a .libs/libldapdb.so* "${pkgdir}/usr/lib/sasl2/"
166 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap"
167 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap/"
170 package_cyrus-sasl-sql() {
171 pkgdesc="SQL auxprop module for Cyrus SASL"
172 depends=("libsasl=${pkgver}" 'postgresql-libs' 'mariadb-libs' 'sqlite')
173 replaces=('cyrus-sasl-plugins')
175 cd cyrus-sasl-$pkgver/plugins
176 install -m755 -d "${pkgdir}/usr/lib/sasl2"
177 cp -a .libs/libsql.so* "${pkgdir}/usr/lib/sasl2/"
179 install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-sql"
180 ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-sql/"