summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2017-06-26 10:18:42 -0500
committerMatthew Thode <prometheanfire@gentoo.org>2017-06-26 10:19:12 -0500
commitf2c3c764326f2483b44361b21a5cbf9087d11084 (patch)
tree0b68002d4139b83a711e18a91e804192fe47a0af /sys-auth
parentsys-kernel/gentoo-sources: genpatches 4.4-77 (diff)
downloadgentoo-f2c3c764326f2483b44361b21a5cbf9087d11084.tar.gz
gentoo-f2c3c764326f2483b44361b21a5cbf9087d11084.tar.bz2
gentoo-f2c3c764326f2483b44361b21a5cbf9087d11084.zip
sys-auth/nss-pam-ldapd: 0.9.8 bup
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/nss-pam-ldapd/Manifest1
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild128
2 files changed, 129 insertions, 0 deletions
diff --git a/sys-auth/nss-pam-ldapd/Manifest b/sys-auth/nss-pam-ldapd/Manifest
index 7e9f8ca3e4e6..d8824478c28b 100644
--- a/sys-auth/nss-pam-ldapd/Manifest
+++ b/sys-auth/nss-pam-ldapd/Manifest
@@ -1,2 +1,3 @@
DIST nss-pam-ldapd-0.8.14.tar.gz 508949 SHA256 a29ceb9b7eda386ca38f16115ffec61425462cca6b5e560c44c3d51edc03a63f SHA512 70abb1836b5b3304e583fd3b71f11fee7586e181b26f4630779ec1d90b856da6e4fcc76327c51b20a158aa36708dd12ceb5f543a33c826881f2ad3e092f542c9 WHIRLPOOL 5d30088d73e464bf380dd5e7d34f8c5200680712693c97ee1f1df1880b4680236d9168ac7ec08b161ae463236c0feddc2171442a956c872113caa6e2b07a6bb8
DIST nss-pam-ldapd-0.9.7.tar.gz 762743 SHA256 0db88d6518bf7ffb01b44f8f8841ece5162906982ce2c9e45e6afff90d3783eb SHA512 2117262f41c4fc54987f9f663ed71126100420ecff391cc280e98d7864094db201a81a4ebf7e5634436982092be3c751971d8aee53e39c42a8572ab57b561284 WHIRLPOOL be1a3a1a5a2eec6fe1e75f5fd40e741fd5dd013534c05898c0498090983632a17931bcf6d3f9e53f583a584d7e02b74c6844343e05617c61e03c0c92b792e044
+DIST nss-pam-ldapd-0.9.8.tar.gz 771247 SHA256 ef7362e7f2003da8c7beb7bcc03c30494acf712625aaac8badc6e7eb16f3453f SHA512 f0d24afd4cb5cea8155aa719b598448d3d81a896f7bc431f7d73e0617a7b2aa7e0ceb6de0b50163848c5554d96a3c415226e32a92e64ed91772fec4c64ad135b WHIRLPOOL 59452c03795d334210fda4b5fbdc23f02e2dfa39e464b6507a8d5f1b8a9caf4033117446d1416de436445f8dc0272252220b1d3cd6f132cbdbba4e3950727fe1
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild
new file mode 100644
index 000000000000..1a5796dd7ea9
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(python2_7)
+inherit eutils prefix user python-r1 multilib multilib-minimal systemd s6
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="http://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="http://arthurdejong.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug kerberos +pam sasl test +utils"
+
+COMMON_DEP="
+ net-nds/openldap[${MULTILIB_USEDEP}]
+ sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ virtual/pam[${MULTILIB_USEDEP}]
+ utils? ( ${PYTHON_DEPS} )
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap"
+RDEPEND="${COMMON_DEP}"
+DEPEND="${COMMON_DEP}
+ test? (
+ ${PYTHON_DEPS}
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )
+ sys-devel/automake"
+
+REQUIRED_USE="
+ utils? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ enewgroup nslcd
+ enewuser nslcd -1 -1 -1 nslcd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch
+ epatch_user
+ use utils && python_setup
+}
+
+multilib_src_configure() {
+ local -a myconf
+
+ myconf=(
+ --disable-utils
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file=/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc')
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)
+ )
+
+ # nss libraries always go in /lib on Gentoo
+ if multilib_is_native_abi ; then
+ myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security")
+ myconf+=("--libdir=${EPREFIX}/$(get_libdir)")
+ else
+ myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security")
+ myconf+=("--libdir=/$(get_libdir)")
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ local script
+
+ newinitd "${FILESDIR}"/nslcd-init-r1 nslcd
+ newinitd "${FILESDIR}"/nslcd-init-r2 nslcd
+ newinitd "${FILESDIR}"/nslcd-init-s6 nslcd-s6
+ s6_install_service nslcd "${FILESDIR}"/nslcd-run-s6
+
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}/${P}/nslcd.conf"
+
+ fperms o-r /etc/nslcd.conf
+
+ if use utils; then
+ python_moduleinto nslcd
+ python_foreach_impl && python_domodule utils/*.py
+
+ for script in chsh getent; do
+ python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
+ done
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
+ systemd_dounit "${FILESDIR}"/nslcd.service
+}
+
+multilib_src_test() {
+ python_foreach_impl emake check
+}
+
+pkg_postinst() {
+ echo
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ echo
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ echo
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
+ elog "to supervise this service."
+ elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
+ elog "default runlevel instead of nslcd."
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+ echo
+}