On 2015/01/12 21:54, Björn Ketelaars wrote: > sslh has been updated to 1.16 (diff enclosed). Please note that: > > 1.) distfile has been moved to github. Makefile has been changed to use GH_*. > 2.) sslh would like to use gmake. To circumvent this requirement this port > has been > patched in the past to use OpenBSDs make. As of 1.16 sslh requires to run > a > bash script before the actual build. This script is intended to generate a > header file. The running of this script has been patched out by placing a > prepared header file in ${FILESDIR} and a Perl one-liner in Makefile. > > Comments? OK?
Alternatively we could just create the file directly in do-configure and avoid the need for the skeleton files/version.h, also pass to make via MAKE_FLAGS which avoids it calling genver.sh (tested with no bash on the system at build time). Does this make sense to you? Index: Makefile =================================================================== RCS file: /cvs/ports/net/sslh/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- Makefile 24 Mar 2014 21:46:16 -0000 1.8 +++ Makefile 12 Jan 2015 23:30:45 -0000 @@ -2,9 +2,12 @@ COMMENT = SSL/SSH multiplexer -VERSION = 1.15 -DISTNAME = sslh-${VERSION} -REVISION = 0 +GH_ACCOUNT = yrutschle +GH_PROJECT = sslh +GH_COMMIT = 9d2deff6ad51622e2de1788af1d1465c5b37075e +V = 1.16 +GH_TAGNAME = v$V +DISTNAME = ${GH_PROJECT}-${GH_TAGNAME:S/v//} CATEGORIES = security net HOMEPAGE = http://www.rutschle.net/tech/sslh.shtml @@ -14,18 +17,19 @@ MAINTAINER = Bjorn Ketelaars <bjorn.kete # GPLv2+ PERMIT_PACKAGE_CDROM = Yes -MASTER_SITES = http://www.rutschle.net/tech/ - WANTLIB = c config LIB_DEPENDS = devel/libconfig MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include -DLIBCONFIG" \ - LIBS="-L${LOCALBASE}/lib -lconfig" + LIBS="-L${LOCALBASE}/lib -lconfig" VERSION=$V NO_TEST = Yes +do-configure: + printf '#ifndef _VERSION_H_\n#define _VERSION_H_\n#define VERSION "$V"\n#endif\n' > ${WRKSRC}/version.h + do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sslh - ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/sslh + ${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/doc/sslh ${INSTALL_DATA} ${WRKSRC}/sslh.8 ${PREFIX}/man/man8 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sslh .for p in basic.cfg example.cfg Index: distinfo =================================================================== RCS file: /cvs/ports/net/sslh/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 30 Aug 2013 19:10:34 -0000 1.4 +++ distinfo 12 Jan 2015 23:30:45 -0000 @@ -1,2 +1,2 @@ -SHA256 (sslh-1.15.tar.gz) = /IVMxdlb4sUCk+ZVt0JwMuznTr7x9/ARnA/D4gcQnM0= -SIZE (sslh-1.15.tar.gz) = 33241 +SHA256 (sslh-1.16.tar.gz) = qw4z/5R6CM8ErykI7Rsfb0ogIOsEsShxhpfgTd0SkXc= +SIZE (sslh-1.16.tar.gz) = 36485 Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/net/sslh/patches/patch-Makefile,v retrieving revision 1.3 diff -u -p -r1.3 patch-Makefile --- patches/patch-Makefile 24 Mar 2014 21:46:16 -0000 1.3 +++ patches/patch-Makefile 12 Jan 2015 23:30:45 -0000 @@ -1,10 +1,6 @@ ---- Makefile.orig Sat Jul 27 16:25:04 2013 -+++ Makefile Mon Mar 24 18:28:02 2014 -@@ -2,35 +2,20 @@ - - VERSION="1.15" - USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files) --USELIBWRAP= # Use libwrap? +--- Makefile.orig Tue Feb 11 21:06:01 2014 ++++ Makefile Mon Jan 12 23:29:39 2015 +@@ -7,43 +7,23 @@ USELIBCAP= # Use libcap? COV_TEST= # Perform test coverage? PREFIX=/usr/local @@ -21,24 +17,36 @@ CC ?= gcc CFLAGS ?=-Wall -g $(CFLAGS_COV) - LIBS=$(LDFLAGS) + LIBS= OBJS=common.o sslh-main.o probe.o -ifneq ($(strip $(USELIBWRAP)),) - LIBS:=$(LIBS) -lwrap -- CFLAGS:=$(CFLAGS) -DLIBWRAP +- CPPFLAGS+=-DLIBWRAP -endif - -ifneq ($(strip $(USELIBCONFIG)),) - LIBS:=$(LIBS) -lconfig -- CFLAGS:=$(CFLAGS) -DLIBCONFIG +- CPPFLAGS+=-DLIBCONFIG +-endif +- +-ifneq ($(strip $(USELIBCAP)),) +- LIBS:=$(LIBS) -lcap +- CPPFLAGS+=-DLIBCAP -endif - all: sslh $(MAN) echosrv .c.o: *.h -@@ -51,7 +36,7 @@ echosrv: $(OBJS) echosrv.o - $(CC) $(CFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + + version.h: +- ./genver.sh >version.h + + sslh: sslh-fork sslh-select + +@@ -59,7 +39,7 @@ echosrv: $(OBJS) echosrv.o + $(CC) $(CFLAGS) $(LDFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS) $(MAN): sslh.pod Makefile - pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN) Index: patches/patch-basic_cfg =================================================================== RCS file: /cvs/ports/net/sslh/patches/patch-basic_cfg,v retrieving revision 1.1 diff -u -p -r1.1 patch-basic_cfg --- patches/patch-basic_cfg 1 Apr 2013 21:37:28 -0000 1.1 +++ patches/patch-basic_cfg 12 Jan 2015 23:30:45 -0000 @@ -1,9 +1,9 @@ $OpenBSD: patch-basic_cfg,v 1.1 2013/04/01 21:37:28 sthen Exp $ ---- basic.cfg.orig Tue Mar 5 19:01:27 2013 -+++ basic.cfg Tue Mar 5 19:01:27 2013 -@@ -6,7 +6,7 @@ foreground: false; - inetd: false; +--- basic.cfg.orig Tue Feb 11 22:06:01 2014 ++++ basic.cfg Thu May 8 13:16:47 2014 +@@ -7,7 +7,7 @@ inetd: false; numeric: false; + transparent: false; timeout: 2; -user: "nobody"; +user: "_sslh"; Index: patches/patch-example_cfg =================================================================== RCS file: /cvs/ports/net/sslh/patches/patch-example_cfg,v retrieving revision 1.1 diff -u -p -r1.1 patch-example_cfg --- patches/patch-example_cfg 1 Apr 2013 21:37:28 -0000 1.1 +++ patches/patch-example_cfg 12 Jan 2015 23:30:45 -0000 @@ -1,9 +1,9 @@ $OpenBSD: patch-example_cfg,v 1.1 2013/04/01 21:37:28 sthen Exp $ ---- example.cfg.orig Tue Mar 5 19:01:28 2013 -+++ example.cfg Tue Mar 5 19:01:28 2013 -@@ -8,7 +8,7 @@ foreground: true; - inetd: false; +--- example.cfg.orig Tue Feb 11 22:06:01 2014 ++++ example.cfg Thu May 8 13:16:47 2014 +@@ -9,7 +9,7 @@ inetd: false; numeric: false; + transparent: false; timeout: 2; -user: "nobody"; +user: "_sslh"; Index: patches/patch-sslh_pod =================================================================== RCS file: /cvs/ports/net/sslh/patches/patch-sslh_pod,v retrieving revision 1.3 diff -u -p -r1.3 patch-sslh_pod --- patches/patch-sslh_pod 1 Apr 2013 21:37:28 -0000 1.3 +++ patches/patch-sslh_pod 12 Jan 2015 23:30:45 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-sslh_pod,v 1.3 2013/04/01 21:37:28 sthen Exp $ ---- sslh.pod.orig Sat Dec 15 16:29:38 2012 -+++ sslh.pod Tue Mar 5 19:15:23 2013 +--- sslh.pod.orig Tue Feb 11 22:06:01 2014 ++++ sslh.pod Thu May 8 13:16:47 2014 @@ -26,17 +26,14 @@ Hence B<sslh> acts as a protocol demultiplexer, or a switchboard. Its name comes from its original function to serve SSH and HTTPS on the same port. @@ -26,7 +26,7 @@ $OpenBSD: patch-sslh_pod,v 1.3 2013/04/0 =head2 Configuration file A configuration file can be supplied to B<sslh>. Command -@@ -187,24 +184,6 @@ Runs in background. This overrides B<foreground> if se +@@ -188,24 +185,6 @@ Runs in background. This overrides B<foreground> if se the configuration file (or on the command line, but there is no point setting both on the command line unless you have a personality disorder). Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/sslh/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 1 Apr 2013 21:37:28 -0000 1.2 +++ pkg/PLIST 12 Jan 2015 23:30:45 -0000 @@ -5,7 +5,7 @@ @bin sbin/sslh-fork @bin sbin/sslh-select share/doc/sslh/ -share/doc/sslh/README +share/doc/sslh/README.md share/examples/sslh/ share/examples/sslh/basic.cfg share/examples/sslh/example.cfg