Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Generic client/server library for SASL authentication" |
| 2 | SECTION = "libs" |
| 3 | HOMEPAGE = "http://asg.web.cmu.edu/sasl/" |
| 4 | DEPENDS = "openssl db groff-native" |
Brad Bishop | 2d39a06 | 2019-10-28 08:33:36 -0400 | [diff] [blame] | 5 | LICENSE = "BSD-4-Clause" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" |
| 7 | |
| 8 | SRCREV = "e41cfb986c1b1935770de554872247453fdbb079" |
| 9 | |
| 10 | SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \ |
| 11 | file://avoid-to-call-AC_TRY_RUN.patch \ |
| 12 | file://Fix-hardcoded-libdir.patch \ |
| 13 | file://debian_patches_0014_avoid_pic_overwrite.diff \ |
| 14 | file://saslauthd.service \ |
| 15 | file://saslauthd.conf \ |
| 16 | file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \ |
| 17 | file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \ |
| 18 | file://0001-makeinit.sh-fix-parallel-build-issue.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | file://CVE-2019-19906.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | " |
| 21 | |
| 22 | UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives" |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | inherit autotools pkgconfig useradd systemd |
| 27 | |
| 28 | EXTRA_OECONF += "--with-dblib=berkeley \ |
| 29 | --with-plugindir='${libdir}/sasl2' \ |
| 30 | andrew_cv_runpath_switch=none" |
| 31 | |
| 32 | PACKAGECONFIG ??= "ntlm \ |
| 33 | ${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)} \ |
| 34 | " |
| 35 | PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," |
| 36 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," |
| 37 | PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," |
| 38 | PACKAGECONFIG[des] = "--with-des,--without-des,," |
| 39 | PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," |
| 40 | PACKAGECONFIG[ntlm] = "--enable-ntlm=yes,--enable-ntlm=no,," |
| 41 | |
| 42 | CFLAGS += "-fPIC" |
| 43 | |
| 44 | do_configure_prepend () { |
| 45 | # make it be able to work with db 5.0 version |
| 46 | local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" |
| 47 | for sed_file in $sed_files; do |
| 48 | sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' ${S}/$sed_file |
| 49 | done |
| 50 | } |
| 51 | |
| 52 | do_compile_prepend () { |
| 53 | cd include |
| 54 | ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/include/makemd5.c -o makemd5 |
| 55 | touch makemd5.o makemd5.lo makemd5 |
| 56 | cd .. |
| 57 | } |
| 58 | |
| 59 | do_install_append() { |
| 60 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 61 | install -d ${D}${systemd_unitdir}/system |
| 62 | install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system |
| 63 | |
| 64 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 65 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 66 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 67 | |
| 68 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 69 | echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf |
| 70 | |
| 71 | install -d ${D}${sysconfdir}/default/ |
| 72 | install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd |
| 73 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd |
| 74 | fi |
| 75 | } |
| 76 | |
| 77 | USERADD_PACKAGES = "${PN}-bin" |
| 78 | USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus" |
| 79 | |
| 80 | SYSTEMD_PACKAGES = "${PN}-bin" |
| 81 | SYSTEMD_SERVICE_${PN}-bin = "saslauthd.service" |
| 82 | SYSTEMD_AUTO_ENABLE = "disable" |
| 83 | |
| 84 | SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425" |
| 85 | SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3" |
| 86 | |
| 87 | PACKAGES =+ "${PN}-bin" |
| 88 | |
| 89 | FILES_${PN} += "${libdir}/sasl2/*.so*" |
| 90 | FILES_${PN}-bin += "${bindir} \ |
| 91 | ${sysconfdir}/default/saslauthd \ |
| 92 | ${systemd_unitdir}/system/saslauthd.service \ |
| 93 | ${sysconfdir}/tmpfiles.d/saslauthd.conf" |
| 94 | FILES_${PN}-dev += "${libdir}/sasl2/*.la" |
| 95 | FILES_${PN}-dbg += "${libdir}/sasl2/.debug" |
| 96 | FILES_${PN}-staticdev += "${libdir}/sasl2/*.a" |
| 97 | |
| 98 | INSANE_SKIP_${PN} += "dev-so" |