freebsd-ports/net/yptransitd/Makefile
Muhammad Moinur Rahman 6e1233be22 Mk/**ldap.mk: Convert USE_LDAP to USES=ldap
Convert the USE_LDAP=yes to USES=ldap and adds the following features:

- Adds the argument USES=ldap:server to add openldap2{4|5|6}-server as
  RUN_DEPENDS
- Adds the argument USES=ldap<version> and replaces WANT_OPENLDAP_VER
- Adds OPENLDAP versions in bsd.default-versions.mk
- Adds USE_OPENLDAP/WANT_OPENLDAP_VER in Mk/bsd.sanity.mk
- Changes consumers to use the features

Reviewed by:	delphij
Approved by:	portmgr
Differential Revision: https://reviews.freebsd.org/D38233
2023-02-08 04:53:56 -06:00

42 lines
1.1 KiB
Makefile

PORTNAME= yptransitd
PORTVERSION= 0.5
PORTREVISION= 8
CATEGORIES= net
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Replacement for nss_ldap
WWW= http://yptransitd.sourceforge.net/
LICENSE= BSD4CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= ldap bison
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-ldap-prefix=${LOCALBASE}
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
PLIST_FILES= %%ETCDIR%%/ldap.conf %%ETCDIR%%/modules/ldap.so \
%%ETCDIR%%/yptransitd.conf sbin/yptransitd
post-patch:
@${REINPLACE_CMD} -e 's, \($$([A-Z]*DIR)\), $${DESTDIR}\1,g' \
${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's,=gcc,=@CC@,' \
${WRKSRC}/lib/Makefile.in
@${REINPLACE_CMD} -e 's,-O2 -g,@CFLAGS@ -fcommon, ; \
s, $${BINDIR}, $${DESTDIR}$${BINDIR},' \
${WRKSRC}/src/Makefile.in
@${REINPLACE_CMD} -E 's,^([[:blank:]]+)\([^\)]+\) ,\1,' \
${WRKSRC}/src/modules.c
@${REINPLACE_CMD} -e 's,-O2 -g,@CFLAGS@, ; \
s, $$(CONFDIR), $${DESTDIR}$$(CONFDIR),' \
${WRKSRC}/src/modules/ldap/Makefile.in
@${REINPLACE_CMD} -e 's,(void \*) ,,g' \
${WRKSRC}/src/modules/ldap/cache.c
pre-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}/modules
.include <bsd.port.mk>