blob: 34bc8c8042cfba01a6f7aeadbc904cbd79f3646a [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "system security services daemon"
2DESCRIPTION = "SSSD is a system security services daemon"
3HOMEPAGE = "https://pagure.io/SSSD/sssd/"
4SECTION = "base"
5LICENSE = "GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
8DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
9DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
10
11SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz\
12 file://sssd.conf "
13
14SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
15SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959"
16
17inherit autotools pkgconfig gettext python-dir distro_features_check
18
19REQUIRED_DISTRO_FEATURES = "pam"
20
21SSSD_UID ?= "root"
22SSSD_GID ?= "root"
23
24CACHED_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
29PACKAGECONFIG ?="nss nscd"
30PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
31PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
32
33PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
34PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
35PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
36PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
37PACKAGECONFIG[python2] = "--with-python2-bindings, --without-python2-bindings"
38PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
39PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
40PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto"
41PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
42PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
43PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/, --with-systemdunitdir="
44PACKAGECONFIG[http] = "--with-secrets, --without-secrets, apache2"
45PACKAGECONFIG[curl] = "--with-secrets --with-kcm, --without-secrets --without-kcm, curl"
46
47EXTRA_OECONF += "--disable-cifs-idmap-plugin --without-nfsv4-idmapd-plugin --without-ipa-getkeytab"
48
49do_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
57do_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
68pkg_postinst_ontarget_${PN} () {
69if [ -e /etc/init.d/populate-volatile.sh ] ; then
70 ${sysconfdir}/init.d/populate-volatile.sh update
71fi
72 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
73}
74
75CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
76
77INITSCRIPT_NAME = "sssd"
78INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
79SYSTEMD_SERVICE_${PN} = "${BPN}.service"
80SYSTEMD_AUTO_ENABLE = "disable"
81
82FILES_${PN} += "${libdir} ${datadir} /run ${libdir}/*.so* "
83FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
84
85# The package contains symlinks that trip up insane
86INSANE_SKIP_${PN} = "dev-so"
87
88RDEPENDS_${PN} = "bind dbus libldb libpam"