1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00
freebsd-ports/dns/opendd/Makefile
Mathieu Arnold 06b4ea3876 Replace bsd.openssl.mk with USES=ssl
Add a qa hint about needing, or not, USES=ssl.

Fix ports doing silly things, like including bsd.openssl.mk directly.

PR:		210322
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6866
2016-06-27 11:31:10 +00:00

71 lines
1.8 KiB
Makefile

# Created by: Alexander Logvinov <ports@logvinov.com>
# $FreeBSD$
PORTNAME= opendd
PORTVERSION= 0.7.9
PORTREVISION= 2
CATEGORIES= dns
MASTER_SITES= http://www.bsdmon.com/download/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= DynDNS client
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
PORTDOCS= README
PLIST_FILES= sbin/${PORTNAME} \
"@sample(,,600) %%ETCDIR%%/${PORTNAME}.conf.sample" \
"%%ETCDIR%%/${PORTNAME}.pem"
OPTIONS_DEFINE= OPENSSL RCNG DOCS
OPTIONS_DEFAULT= OPENSSL RCNG
RCNG_DESC= Install RC_NG script
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MRCNG}
USE_RC_SUBR= ${PORTNAME}
.endif
.if ${PORT_OPTIONS:MOPENSSL}
USES+= ssl
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
MAKE_ENV+= "USE_SOCKET_SSL=yes"
.endif
post-extract:
@${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}.${PORTVERSION}
post-patch:
.for i in ${PORTNAME}.conf globals.h
@${REINPLACE_CMD} 's|/etc/${PORTNAME}.pem|${ETCDIR}/${PORTNAME}.pem|' \
${WRKSRC}/${i}
.endfor
@${REINPLACE_CMD} 's|/etc/${PORTNAME}.conf|${ETCDIR}/${PORTNAME}.conf|' \
${WRKSRC}/globals.h
post-patch-OPENSSL-on:
@${REINPLACE_CMD} 's|use_ssl = 0|use_ssl = 1|' ${WRKSRC}/${PORTNAME}.conf
@${REINPLACE_CMD} -e "s|^FLAGS =|FLAGS = ${CFLAGS}|" -e "s|^SSL =|SSL = ${LDFLAGS}|" \
${WRKSRC}/Makefile
post-patch-RCNG-on:
@${REINPLACE_CMD} 's|runasdaemon = 0|runasdaemon = 1|' ${WRKSRC}/${PORTNAME}.conf
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
@${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pem ${STAGEDIR}${ETCDIR}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} -p ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>