1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00
freebsd-ports/security/stunnel/Makefile
Peter Pentchev 51f2c79e0a Fix the bus error on startup in -CURRENT and 5.x-BETA. It turns out
that the OpenSSL ENGINE code is, well, somewhat less than stellar,
especially in combo with malloc's 'j' option.  Even without it, though,
there are some problems that I don't have time to look into right now.

So, disable the OpenSSL ENGINE activation on FreeBSD 5.x, unless
the WITH_STUNNEL_SSL_ENGINE knob is turned on.  Also, while I'm here,
fix the CONFIGURE_TARGET so the GNU configure script does not complain
quite so loudly.  Bump PORTREVISION for the functionality change
(well, I guess you could say "not working" -> "working" is a functionality
change ;)
2004-09-02 15:46:15 +00:00

95 lines
3.5 KiB
Makefile

# New ports collection makefile for: stunnel
# Date created: Mon Jan 11 11:53:54 EET 1999
# Whom: Martti Kuparinen <martti.kuparinen@ericsson.com>
#
# $FreeBSD$
#
PORTNAME= stunnel
PORTVERSION= 4.05
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
ftp://opensores.thebunker.net/pub/mirrors/stunnel/download/stunnel/src/
MAINTAINER= roam@FreeBSD.org
COMMENT= SSL encryption wrapper for standard network daemons
USE_OPENSSL= YES
USE_REINPLACE= YES
USE_INC_LIBTOOL_VER= 13
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --target=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=/var/tmp --with-pem-dir=${PEM_DIR} \
--enable-static
.if !defined(NOPORTDOCS)
MAN8= stunnel.8 stunnel.fr.8 stunnel.pl.8
.endif
PEM_DIR?= ${PREFIX}/etc
post-patch:
# place files under /var/tmp so that this can be run by an unprivileged user
# user stunnel and group stunnel
@${REINPLACE_CMD} -E -e 's|\@prefix\@/var/run/stunnel/|/var/tmp/stunnel|; \
s|nobody|stunnel|;s|nogroup|stunnel|' \
${WRKSRC}/tools/stunnel.conf-sample.in
@${REINPLACE_CMD} -E -e 's|localstatedir/run/stunnel.pid|localstatedir/stunnel.pid|' \
${WRKSRC}/configure.ac ${WRKSRC}/configure
@${FIND} ${WRKSRC} -type f -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -E -e 's,@(ACLOCAL|AUTO(MAKE|CONF|HEADER))@,/usr/bin/true,'
.ifdef(NOPORTDOCS)
@${REINPLACE_CMD} -E -e 's/ install-docDATA/ /; s/^(SUBDIRS.+)doc/\1/' \
${WRKSRC}/Makefile.in
.endif
post-install:
@${SED} "s+!!PREFIX!!+${PREFIX}+g" < ${FILESDIR}/stunnel.sh \
> ${PREFIX}/etc/rc.d/stunnel.sh.sample
@${CHMOD} 755 ${PREFIX}/etc/rc.d/stunnel.sh.sample
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO} ""
@${ECHO} "**************************************************************************"
@${ECHO} "To create and install a new certificate, type \"make cert\""
@${ECHO} ""
@${ECHO} "And don't forget to check out the FAQ at http://www.stunnel.org/"
@${ECHO} "**************************************************************************"
@${ECHO} ""
cert:
@${ECHO} ""
@${ECHO} "**************************************************************************"
@${ECHO} "The new certificate will be saved into ${PREFIX}/etc/stunnel.pem"
@${ECHO} "**************************************************************************"
@${ECHO} ""
@(cd ${WRKSRC}/tools/; make stunnel.pem)
${INSTALL} -m 600 ${WRKSRC}/tools/stunnel.pem ${PEM_DIR}/
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 500000
.if !defined(WITH_STUNNEL_SSL_ENGINE)
EXTRA_PATCHES= ${FILESDIR}/ssl-noengine.patch
pre-patch:
@${ECHO} "*************************************************************************"
@${ECHO} "Note: you have to explicitly define WITH_STUNNEL_SSL_ENGINE to activate"
@${ECHO} "the OpenSSL ENGINE code on FreeBSD 5.x."
@${ECHO} "There are known reliability issues with stunnel and the OpenSSL ENGINE"
@${ECHO} "code, so you are advised not to enable it."
@${ECHO} "*************************************************************************"
.else
pre-patch:
@${ECHO} "*************************************************************************"
@${ECHO} "Note: you have defined WITH_STUNNEL_SSL_ENGINE. Now stunnel will activate"
@${ECHO} "the OpenSSL ENGINE code even on FreeBSD 5.x."
@${ECHO} "There are known reliability issues with stunnel and the OpenSSL ENGINE"
@${ECHO} "code. You have enabled it at your own risk."
@${ECHO} "*************************************************************************"
.endif
.endif
.include <bsd.port.post.mk>