Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Generic client/server library for SASL authentication" |
| 2 | SECTION = "libs" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3 | HOMEPAGE = "http://asg.web.cmu.edu/sasl/" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | DEPENDS = "openssl db" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" |
| 7 | |
| 8 | SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 9 | file://avoid-to-call-AC_TRY_RUN.patch \ |
| 10 | file://Fix-hardcoded-libdir.patch \ |
| 11 | file://debian_patches_0009_sasldb_al.diff \ |
| 12 | file://debian_patches_0014_avoid_pic_overwrite.diff \ |
| 13 | file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \ |
| 14 | file://saslauthd.service \ |
| 15 | file://saslauthd.conf \ |
| 16 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 17 | |
| 18 | inherit autotools-brokensep pkgconfig useradd systemd |
| 19 | |
| 20 | EXTRA_OECONF += "--with-dblib=berkeley \ |
| 21 | --with-bdb-libdir=${STAGING_LIBDIR} \ |
| 22 | --with-bdb-incdir=${STAGING_INCDIR} \ |
| 23 | --with-bdb=db-5.3 \ |
| 24 | --with-plugindir="${libdir}/sasl2" \ |
| 25 | andrew_cv_runpath_switch=none" |
| 26 | |
| 27 | PACKAGECONFIG ??= "ntlm \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 ldap pam', d)} \ |
| 29 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 30 | PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," |
| 31 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," |
| 32 | PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," |
| 33 | PACKAGECONFIG[des] = "--with-des,--without-des,," |
| 34 | PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," |
| 35 | PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,," |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 36 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 37 | |
| 38 | CFLAGS += "-fPIC" |
| 39 | |
| 40 | do_configure_prepend () { |
| 41 | rm -f acinclude.m4 config/libtool.m4 |
| 42 | |
| 43 | # make it be able to work with db 5.0 version |
| 44 | local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" |
| 45 | for sed_file in $sed_files; do |
| 46 | sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file |
| 47 | done |
| 48 | } |
| 49 | |
| 50 | do_compile_prepend () { |
| 51 | cd include |
| 52 | ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} makemd5.c -o makemd5 |
| 53 | touch makemd5.o makemd5.lo makemd5 |
| 54 | cd .. |
| 55 | } |
| 56 | |
| 57 | do_install_append() { |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 58 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 59 | install -d ${D}${systemd_unitdir}/system |
| 60 | install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system |
| 61 | |
| 62 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 63 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 64 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service |
| 65 | |
| 66 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 67 | echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf |
| 68 | |
| 69 | install -d ${D}${sysconfdir}/default/ |
| 70 | install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd |
| 71 | sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd |
| 72 | fi |
| 73 | } |
| 74 | |
| 75 | USERADD_PACKAGES = "${PN}-bin" |
| 76 | USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus" |
| 77 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 78 | SYSTEMD_PACKAGES = "${PN}-bin" |
| 79 | SYSTEMD_SERVICE_${PN}-bin = "saslauthd.service" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 80 | SYSTEMD_AUTO_ENABLE = "disable" |
| 81 | |
| 82 | SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425" |
| 83 | SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3" |
| 84 | |
| 85 | PACKAGES =+ "${PN}-bin" |
| 86 | |
| 87 | FILES_${PN} += "${libdir}/sasl2/*.so*" |
| 88 | FILES_${PN}-bin += "${bindir} \ |
| 89 | ${sysconfdir}/default/saslauthd \ |
| 90 | ${systemd_unitdir}/system/saslauthd.service \ |
| 91 | ${sysconfdir}/tmpfiles.d/saslauthd.conf" |
| 92 | FILES_${PN}-dev += "${libdir}/sasl2/*.la" |
| 93 | FILES_${PN}-dbg += "${libdir}/sasl2/.debug" |
| 94 | FILES_${PN}-staticdev += "${libdir}/sasl2/*.a" |
| 95 | |
| 96 | INSANE_SKIP_${PN} += "dev-so" |