diff options
Diffstat (limited to 'net/nss-pam-ldapd/Makefile')
-rw-r--r-- | net/nss-pam-ldapd/Makefile | 67 |
1 files changed, 41 insertions, 26 deletions
diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile index 5c043166c329..31c5a95c3be1 100644 --- a/net/nss-pam-ldapd/Makefile +++ b/net/nss-pam-ldapd/Makefile @@ -4,31 +4,44 @@ # # $FreeBSD$ # +# vim: ft=pmake tw=78 fo=cq +# PORTNAME= nss-pam-ldapd -PORTVERSION= 0.8.6 +PORTVERSION= 0.8.9 CATEGORIES= net -MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ \ - http://static.ipfw.ru/files/ +MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ -MAINTAINER= rflynn@acsalaska.net -COMMENT= Advanced fork of nss_ldap +MAINTAINER?= rflynn@acsalaska.net +COMMENT?= Advanced fork of nss_ldap LICENSE= LGPL21 LGPL3 LICENSE_COMB= dual GNU_CONFIGURE= yes -USE_GMAKE= yes +# Gmake seems to be not really needed anymore. +# Gmake specific constructs are limited to maintainer targets +# USE_GMAKE= yes USE_OPENLDAP= yes USE_RC_SUBR= nslcd PAM_LDAP_SHMAJOR= 1 NSS_LDAP_SHMAJOR= 1 +PKGMESSAGE= ${WRKDIR}/pkg-message +SUB_FILES+= pkg-message NSLCD_PIDFILE?= /var/run/nslcd.pid NSLCD_SOCKET?= /var/run/nslcd.ctl -OPTIONS= SASL "Enable SASL" off \ +.if defined(SLAVE_PORT) +OPTIONS= PAM "Build pam_ldap" on \ + NSS "Build nss support" on +WITH_SASL=yes +CONFLICTS+= nss-pam-ldapd-[0-9]* +.else +OPTIONS= NSS "Build nss support" on \ PAM "Build pam_ldap" on +CONFLICTS+= nss-pam-ldapd-sasl-[0-9]* +.endif USERS= nslcd GROUPS= nslcd @@ -45,7 +58,8 @@ CONFIGURE_ARGS+= --with-nslcd-pidfile=${NSLCD_PIDFILE} \ CONFIG_FILE= "nslcd.conf" CONFIGURE_ARGS+= --with-ldap-conf-file=${PREFIX}/etc/${CONFIG_FILE} -PLIST_SUB+= CONFIG=${CONFIG_FILE} +PLIST_SUB+= CONFIG="${CONFIG_FILE}" +SUB_LIST+= CONFIG_FILE="${PREFIX}/etc/${CONFIG_FILE}" .if defined(WITH_SASL) WANT_OPENLDAP_SASL= yes @@ -69,12 +83,17 @@ PLIST_SUB+= PAM="@comment " .if defined(WITHOUT_NSS) CONFIGURE_ARGS+= --disable-nss PLIST_SUB+= NSS="@comment " +SUB_LIST+= NSS_MESSAGE="" .else CONFIGURE_ARGS+= --enable-nss CONFLICTS+= nss_ldap-1.* PLIST_SUB+= NSS="" +SUB_LIST+= NSS_MESSAGE="WARNING: Be sure to set uid and gid configuration parameters to make nslcd run under unprivileged user." .endif +# Won't hook this in to OPTIONS until PADL ports are at least DEPRECATED. +# It doesn't do the software any good to run as replacement for the PADL ports +# without running the daemon. .if defined(WITHOUT_NSLCD) CONFIGURE_ARGS+= --disable-nslcd PLIST_SUB+= NSLCD="@comment " @@ -85,33 +104,29 @@ MAN5+= nslcd.conf.5 MAN8+= nslcd.8 .endif +.if defined(WITHOUT_NSS) && defined(WITHOUT_PAM) +BROKEN= Software is useless if both NSS and PAM are disabled.\ + Rerun 'make config' or 'portmaster --force-config'. +.endif + post-extract: @${REINPLACE_CMD} -e 's/\(INSTALL_\)\(.*\)) -D /\1\2) /' ${WRKSRC}/Makefile.in ${WRKSRC}/nss/Makefile.in post-configure: ${REINPLACE_CMD} -e 's/^\(CFLAGS.*\) \-O2 \(.*\)$$/\1 -O0 \2/' ${WRKSRC}/nss/Makefile -post-install: +show-pkgmessage:: + @${ECHO_CMD}; ${CAT} ${PKGMESSAGE} | ${FMT} 75 79; ${ECHO_CMD} + +# 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 .if !defined(WITHOUT_NSS) - @cd ${PREFIX}/lib && ${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} \ - nss_ldap.so + @${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} ${PREFIX}/lib/nss_ldap.so .endif .if !defined(WITHOUT_PAM) - @cd ${PREFIX}/lib && ${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} \ - pam_ldap.so -.endif - @${ECHO_MSG} - @${ECHO_MSG} ===================================================================== - @${ECHO_MSG} - @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/${CONFIG_FILE}" - @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/${CONFIG_FILE}.sample" - @${ECHO_MSG} -.if !defined(WITHOUT_NSS) - @${ECHO_MSG} " WARNING: Be sure to set uid and gid configuration parameters" - @${ECHO_MSG} " WARNING: to make nslcd run under unprivileged user" + @${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} ${PREFIX}/lib/pam_ldap.so .endif - @${ECHO_MSG} - @${ECHO_MSG} ===================================================================== - @${ECHO_MSG} .include <bsd.port.mk> |