From 4face5351d4cfb1f513e4d517a11d6bd49c7ac8d Mon Sep 17 00:00:00 2001 From: zi Date: Mon, 3 Mar 2014 14:36:30 +0000 Subject: - Fix service command always returning 0 [1] - Add STAGE support PR: ports/187073 [1] Submitted by: Derek Kulinski [1] --- net/nss-pam-ldapd/Makefile | 12 ++++-------- net/nss-pam-ldapd/files/nslcd.in | 1 + net/nss-pam-ldapd/files/pkg-message.in | 6 +++++- net/nss-pam-ldapd/pkg-plist | 4 ++++ 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile index c835b7ffb047..da8faf4ab90d 100644 --- a/net/nss-pam-ldapd/Makefile +++ b/net/nss-pam-ldapd/Makefile @@ -3,7 +3,7 @@ PORTNAME= nss-pam-ldapd PORTVERSION= 0.8.13 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ \ http://mirrors.rit.edu/zi/ @@ -49,7 +49,6 @@ CONFLICTS+= nss-pam-ldapd-sasl-[0-9]* USERS= nslcd GROUPS= nslcd -NO_STAGE= yes .include CPPFLAGS+= -I${LOCALBASE}/include @@ -78,7 +77,6 @@ CONFIGURE_ARGS+= --disable-sasl CONFIGURE_ARGS+= --enable-pam \ --with-pam-seclib-dir=${PREFIX}/lib \ --with-pam-ldap-soname=pam_ldap.so.${PAM_LDAP_SHMAJOR} -MAN8+= pam_ldap.8 CONFLICTS+= pam_ldap-1.* PLIST_SUB+= PAM="" .else @@ -106,8 +104,6 @@ PLIST_SUB+= NSLCD="@comment " .else CONFIGURE_ARGS+= --enable-nslcd PLIST_SUB+= NSLCD="" -MAN5+= nslcd.conf.5 -MAN8+= nslcd.8 .endif post-extract: @@ -122,12 +118,12 @@ show-pkgmessage:: # We take care of the sample file, upstream install target installs the actual # file if it does not exist yet. post-install: show-pkgmessage - @${INSTALL_DATA} ${WRKSRC}/nslcd.conf ${PREFIX}/etc/nslcd.conf.sample + @${INSTALL_DATA} ${WRKSRC}/nslcd.conf ${STAGEDIR}${PREFIX}/etc/nslcd.conf.sample .if ${PORT_OPTIONS:MNSS} - @${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} ${PREFIX}/lib/nss_ldap.so + @${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} ${STAGEDIR}${PREFIX}/lib/nss_ldap.so .endif .if ${PORT_OPTIONS:MPAM} - @${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} ${PREFIX}/lib/pam_ldap.so + @${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} ${STAGEDIR}${PREFIX}/lib/pam_ldap.so .endif .include diff --git a/net/nss-pam-ldapd/files/nslcd.in b/net/nss-pam-ldapd/files/nslcd.in index a46c8073482c..7ffdf2eb924c 100644 --- a/net/nss-pam-ldapd/files/nslcd.in +++ b/net/nss-pam-ldapd/files/nslcd.in @@ -62,6 +62,7 @@ nslcd_status() echo "${name} is running with PID ${mypid}."; else echo "${name} not running?"; + return 1 fi } diff --git a/net/nss-pam-ldapd/files/pkg-message.in b/net/nss-pam-ldapd/files/pkg-message.in index dbde6dcf7290..613dda8ea2b7 100644 --- a/net/nss-pam-ldapd/files/pkg-message.in +++ b/net/nss-pam-ldapd/files/pkg-message.in @@ -1,6 +1,10 @@ ===================================================================== -LDAP and nslcd daemon parameters should be set in %%CONFIG_FILE%%. When upgrading review %%CONFIG_FILE%%.sample for additional or changed parameters. +LDAP and nslcd daemon parameters should be set in: +%%CONFIG_FILE%%. + +When upgrading review %%CONFIG_FILE%%.sample for +additional or changed parameters. %%NSS_MESSAGE%% diff --git a/net/nss-pam-ldapd/pkg-plist b/net/nss-pam-ldapd/pkg-plist index fecf99a40ee4..f0e774e48a10 100644 --- a/net/nss-pam-ldapd/pkg-plist +++ b/net/nss-pam-ldapd/pkg-plist @@ -1,8 +1,12 @@ +@comment $FreeBSD$ @unexec if cmp -s %D/etc/%%CONFIG%%.sample %D/etc/%%CONFIG%%; then rm -f %D/etc/%%CONFIG%%; fi etc/%%CONFIG%%.sample %%NSS%%lib/nss_ldap.so %%NSS%%lib/nss_ldap.so.%%NSS_LDAP_SHMAJOR%% %%NSLCD%%sbin/nslcd +%%NSLCD%%man/man8/nslcd.8.gz +%%NSLCD%%man/man5/nslcd.conf.5.gz %%PAM%%lib/pam_ldap.so %%PAM%%lib/pam_ldap.so.%%PAM_LDAP_SHMAJOR%% +%%PAM%%man/man8/pam_ldap.8.gz @exec if [ ! -f %D/etc/%%CONFIG%% ]; then cp -p %D/etc/%%CONFIG%%.sample %D/etc/%%CONFIG%%; fi -- cgit