Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "system security services daemon" |
| 2 | DESCRIPTION = "SSSD is a system security services daemon" |
| 3 | HOMEPAGE = "https://pagure.io/SSSD/sssd/" |
| 4 | SECTION = "base" |
| 5 | LICENSE = "GPLv3+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 7 | |
| 8 | DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive" |
| 9 | DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent" |
| 10 | |
| 11 | SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz\ |
| 12 | file://sssd.conf " |
| 13 | |
| 14 | SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50" |
| 15 | SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959" |
| 16 | |
Brad Bishop | 95dbbac | 2019-12-02 13:55:25 -0500 | [diff] [blame] | 17 | inherit autotools pkgconfig gettext python-dir features_check |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | |
| 19 | REQUIRED_DISTRO_FEATURES = "pam" |
| 20 | |
| 21 | SSSD_UID ?= "root" |
| 22 | SSSD_GID ?= "root" |
| 23 | |
| 24 | CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \ |
| 25 | ac_cv_path_NSUPDATE=${bindir} \ |
| 26 | ac_cv_path_PYTHON2=${PYTHON_DIR} ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \ |
| 27 | " |
| 28 | |
| 29 | PACKAGECONFIG ?="nss nscd" |
| 30 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 31 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 32 | |
| 33 | PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " |
| 34 | PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" |
| 35 | PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" |
| 36 | PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no" |
| 37 | PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings" |
| 38 | PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" |
| 39 | PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss," |
| 40 | PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto" |
| 41 | PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no " |
| 42 | PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" |
| 43 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/, --with-systemdunitdir=" |
| 44 | PACKAGECONFIG[http] = "--with-secrets, --without-secrets, apache2" |
| 45 | PACKAGECONFIG[curl] = "--with-secrets --with-kcm, --without-secrets --without-kcm, curl" |
| 46 | |
| 47 | EXTRA_OECONF += "--disable-cifs-idmap-plugin --without-nfsv4-idmapd-plugin --without-ipa-getkeytab" |
| 48 | |
| 49 | do_configure_prepend() { |
| 50 | mkdir -p ${AUTOTOOLS_AUXDIR}/build |
| 51 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/ |
| 52 | |
| 53 | # libresove has host path, remove it |
| 54 | sed -i -e "s#\$sss_extra_libdir##" ${S}/src/external/libresolv.m4 |
| 55 | } |
| 56 | |
| 57 | do_install () { |
| 58 | oe_runmake install DESTDIR="${D}" |
| 59 | rmdir --ignore-fail-on-non-empty "${D}/${bindir}" |
| 60 | install -d ${D}/${sysconfdir}/${BPN} |
| 61 | install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN} |
| 62 | |
| 63 | # Remove /var/run as it is created on startup |
| 64 | rm -rf ${D}${localstatedir}/run |
| 65 | |
| 66 | } |
| 67 | |
| 68 | pkg_postinst_ontarget_${PN} () { |
| 69 | if [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 70 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 71 | fi |
| 72 | chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf |
| 73 | } |
| 74 | |
| 75 | CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf" |
| 76 | |
| 77 | INITSCRIPT_NAME = "sssd" |
| 78 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." |
| 79 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" |
| 80 | SYSTEMD_AUTO_ENABLE = "disable" |
| 81 | |
| 82 | FILES_${PN} += "${libdir} ${datadir} /run ${libdir}/*.so* " |
| 83 | FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la" |
| 84 | |
| 85 | # The package contains symlinks that trip up insane |
| 86 | INSANE_SKIP_${PN} = "dev-so" |
| 87 | |
| 88 | RDEPENDS_${PN} = "bind dbus libldb libpam" |