From 1adf67fb61e5a222310df3cf9d4e62ed9666b5b2 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 3 Jun 2012 00:17:34 +0000 Subject: [PATCH] update to 1.13 convert to optionsng add license fix build with clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR: ports/168614 Submitted by: Olivier Cochard-Labbé --- net/sslh/Makefile | 34 ++++++++++++++++++++++++---------- net/sslh/distinfo | 4 ++-- net/sslh/files/patch-Makefile | 34 +++++++++++++++++++--------------- net/sslh/files/sslh.in | 4 ++-- net/sslh/pkg-plist | 1 - 5 files changed, 47 insertions(+), 30 deletions(-) diff --git a/net/sslh/Makefile b/net/sslh/Makefile index b17b059ba462..9b5ca3faf8c9 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -6,35 +6,49 @@ # PORTNAME= sslh -PORTVERSION= 1.11 +PORTVERSION= 1.13 CATEGORIES= net MASTER_SITES= http://www.rutschle.net/tech/ MAINTAINER= olivier@cochard.me COMMENT= A ssl/ssh multiplexer +LICENSE= GPLv2 + +DISTFILES= ${PORTNAME}-${PORTVERSION}b.tar.gz + +LIB_DEPENDS= config:${PORTSDIR}/devel/libconfig + USE_GMAKE= yes USE_PERL5_BUILD= yes -.if !defined(NO_INSTALL_MANPAGES) +OPTIONS_DEFINE= MANPAGES EXAMPLES +OPTIONS_DEFAULT= MANPAGES EXAMPLES + +CFLAGS+= -I${LOCALBASE}/include +MAKE_ENV+= LIBS="-L${LOCALBASE}/lib" + +.include + +.if ${PORT_OPTIONS:MMANPAGES} MAN8= sslh.8 .endif -VARDIR= /var -PLIST_SUB= VARDIR=${VARDIR} - USE_RC_SUBR= sslh -post-patch: - @${REINPLACE_CMD} -e 's|^PREFIX=/usr/local|PREFIX=${PREFIX}|g' ${WRKSRC}/Makefile +PORTEXAMPLES= example.cfg do-install: @${INSTALL_PROGRAM} ${WRKSRC}/sslh-fork ${PREFIX}/sbin @${INSTALL_PROGRAM} ${WRKSRC}/sslh-select ${PREFIX}/sbin - @${MKDIR} ${VARDIR}/run/${PORTNAME} - @${CHOWN} -R nobody:nobody ${VARDIR}/run/${PORTNAME} -.if !defined(NO_INSTALL_MANPAGES) + #@${MKDIR} ${VARDIR}/run/${PORTNAME} + #@${CHOWN} -R nobody:nobody ${VARDIR}/run/${PORTNAME} +.if ${PORT_OPTIONS:MMANPAGES} @${INSTALL_MAN} ${WRKSRC}/sslh.8 ${MANPREFIX}/man/man8 .endif +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/${PORTEXAMPLES} ${EXAMPLESDIR} +.endif .include diff --git a/net/sslh/distinfo b/net/sslh/distinfo index 686107fbd5fd..5b3ba269c692 100644 --- a/net/sslh/distinfo +++ b/net/sslh/distinfo @@ -1,2 +1,2 @@ -SHA256 (sslh-1.11.tar.gz) = e1bf699ac2990954462926c26140b8ae40dabe107bb9aef89967a52c7e141e54 -SIZE (sslh-1.11.tar.gz) = 25779 +SHA256 (sslh-1.13b.tar.gz) = e6493b53767b542652e99e64a1bceeded1d01a5e7a083fde9d67e7550f9c0eec +SIZE (sslh-1.13b.tar.gz) = 30986 diff --git a/net/sslh/files/patch-Makefile b/net/sslh/files/patch-Makefile index 8f2ecf3d096d..df629b2f6e54 100644 --- a/net/sslh/files/patch-Makefile +++ b/net/sslh/files/patch-Makefile @@ -1,20 +1,24 @@ ---- Makefile.old 2011-12-02 10:16:46.000000000 +0000 -+++ Makefile 2011-12-02 10:18:04.000000000 +0000 -@@ -5,7 +5,7 @@ +--- ./Makefile.orig 2012-06-03 02:10:16.959537483 +0200 ++++ ./Makefile 2012-06-03 02:10:20.312769958 +0200 +@@ -4,7 +4,7 @@ + USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files) + USELIBWRAP= # Use libwrap? COV_TEST= # Perform test coverage? - PREFIX=/usr/local +-PREFIX=/usr/local ++PREFIX ?=/usr/local --MAN=sslh.8.gz # man page name -+MAN=sslh.8 # man page name + MAN=sslh.8.gz # man page name - # End of configuration -- the rest should take care of - # itself -@@ -46,7 +46,7 @@ - $(CC) $(CFLAGS) -o echosrv echosrv.o common.o $(LIBS) +@@ -15,10 +15,9 @@ + CFLAGS_COV=-fprofile-arcs -ftest-coverage + endif - $(MAN): sslh.pod Makefile -- pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) -+ pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod > $(MAN) +-CC = gcc +-CFLAGS=-Wall -g $(CFLAGS_COV) ++CC ?= gcc ++CFLAGS ?=-Wall -g $(CFLAGS_COV) - # generic install: install binary and man page - install: sslh $(MAN) +-LIBS= + OBJS=common.o sslh-main.o probe.o + + ifneq ($(strip $(USELIBWRAP)),) diff --git a/net/sslh/files/sslh.in b/net/sslh/files/sslh.in index f21854198bfa..af6b70ae7caa 100644 --- a/net/sslh/files/sslh.in +++ b/net/sslh/files/sslh.in @@ -59,10 +59,10 @@ sslh_openvpntarget=${sslh_openvpntarget:-"localhost:1193"} sslh_xmpptarget=${sslh_xmpptarget:-"localhost:5222"} sslh_tinctarget=${sslh_tinctarget:-"localhost:655"} -pidfile=${sslh_pidfile:-"/var/run/sslh/sslh.pid"} +pidfile=${sslh_pidfile:-"/var/run/sslh.pid"} command="%%PREFIX%%/sbin/${name}-${sslh_mode}" command_args="-t ${sslh_sshtimeout} -p ${sslh_listening} \ - --ssl ${sslh_ssltarget} --ssh ${sslh_sshtarget} -P ${pidfile} \ + --ssh ${sslh_sshtarget} --ssl ${sslh_ssltarget} -P ${pidfile} \ --user nobody --openvpn ${sslh_openvpntarget} \ --xmpp ${sslh_xmpptarget} --tinc ${sslh_tinctarget}" diff --git a/net/sslh/pkg-plist b/net/sslh/pkg-plist index fddf592903e5..9ab418f34bfa 100644 --- a/net/sslh/pkg-plist +++ b/net/sslh/pkg-plist @@ -1,3 +1,2 @@ sbin/sslh-fork sbin/sslh-select -@dirrmtry %%VARDIR%%/run/sslh