aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2014-05-02 18:28:34 +0000
committerMarius Strobl <marius@FreeBSD.org>2014-05-02 18:28:34 +0000
commit7bd9be216a401b88f94a67d69d1a338628ef1da9 (patch)
treeee564850ba0e858df6d0b39cd923daf481eb14fe /net
parent53f1e830835d3e13cd805d249a657ff8c3a05174 (diff)
downloadports-7bd9be216a401b88f94a67d69d1a338628ef1da9.tar.gz
ports-7bd9be216a401b88f94a67d69d1a338628ef1da9.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/sslh/Makefile30
-rw-r--r--net/sslh/distinfo4
-rw-r--r--net/sslh/files/patch-Makefile11
-rw-r--r--net/sslh/files/patch-genver.sh38
-rw-r--r--net/sslh/files/sslh.in21
5 files changed, 85 insertions, 19 deletions
diff --git a/net/sslh/Makefile b/net/sslh/Makefile
index 9092a57ebdb8..78503b61d891 100644
--- a/net/sslh/Makefile
+++ b/net/sslh/Makefile
@@ -2,7 +2,8 @@
# $FreeBSD$
PORTNAME= sslh
-PORTVERSION= 1.15
+PORTVERSION= 1.16
+DISTVERSIONPREFIX= v
CATEGORIES= net
MASTER_SITES= http://www.rutschle.net/tech/
@@ -16,11 +17,11 @@ LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig
USES= gmake perl5
USE_PERL5= build
-OPTIONS_DEFINE= EXAMPLES
-OPTIONS_DEFAULT= EXAMPLES
+OPTIONS_DEFINE= EXAMPLES LIBWRAP
+OPTIONS_DEFAULT= EXAMPLES LIBWRAP
-CFLAGS= -I${LOCALBASE}/include
-LDFLAGS= -L${LOCALBASE}/lib
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= sbin/sslh-fork \
sbin/sslh-select \
@@ -31,12 +32,27 @@ USE_RC_SUBR= sslh
PORTEXAMPLES= example.cfg
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MLIBWRAP}
+MAKE_ENV+= USELIBWRAP=1
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -Ee 's,^(release=)$$,\1${PORTVERSION},' \
+ ${WRKSRC}/genver.sh
+ @${REINPLACE_CMD} -Ee 's,/etc/init.d/(sslh),${PREFIX}/etc/rc.d/\1,g; \
+ s,/etc/default/(sslh),${PREFIX}/etc/\1.conf,g' \
+ ${WRKSRC}/sslh.pod
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sslh-fork ${STAGEDIR}${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/sslh-select ${STAGEDIR}${PREFIX}/sbin
- ${INSTALL_DATA} ${WRKSRC}/basic.cfg ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/basic.cfg \
+ ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
${INSTALL_MAN} ${WRKSRC}/sslh.8.gz ${STAGEDIR}${MANPREFIX}/man/man8
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/,} ${STAGEDIR}${EXAMPLESDIR}/
+ ${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/,} \
+ ${STAGEDIR}${EXAMPLESDIR}/
.include <bsd.port.mk>
diff --git a/net/sslh/distinfo b/net/sslh/distinfo
index 4301aafa38f0..25c32bd7fe92 100644
--- a/net/sslh/distinfo
+++ b/net/sslh/distinfo
@@ -1,2 +1,2 @@
-SHA256 (sslh-1.15.tar.gz) = fc854cc5d95be2c50293e655b7427032ece74ebef1f7f0119c0fc3e207109ccd
-SIZE (sslh-1.15.tar.gz) = 33241
+SHA256 (sslh-v1.16.tar.gz) = e97b3be9f010bc763a7f11c94e54d8ead33cab3f0c93a52bb9a7f708212e5902
+SIZE (sslh-v1.16.tar.gz) = 36483
diff --git a/net/sslh/files/patch-Makefile b/net/sslh/files/patch-Makefile
new file mode 100644
index 000000000000..e90eddf04eab
--- /dev/null
+++ b/net/sslh/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2014-02-11 22:06:01.000000000 +0100
++++ Makefile 2014-05-01 01:58:43.000000000 +0200
+@@ -2,7 +2,7 @@
+
+ VERSION=$(shell ./genver.sh -r)
+ USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
+-USELIBWRAP= # Use libwrap?
++USELIBWRAP?= # Use libwrap?
+ USELIBCAP= # Use libcap?
+ COV_TEST= # Perform test coverage?
+ PREFIX=/usr/local
diff --git a/net/sslh/files/patch-genver.sh b/net/sslh/files/patch-genver.sh
new file mode 100644
index 000000000000..5b2f31cad8f6
--- /dev/null
+++ b/net/sslh/files/patch-genver.sh
@@ -0,0 +1,38 @@
+--- genver.sh.orig 2014-02-11 22:06:01.000000000 +0100
++++ genver.sh 2014-04-30 17:06:00.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+
+ if [ ${#} -eq 1 ] && [ "x$1" = "x-r" ]; then
+ # release text only
+@@ -7,28 +7,7 @@
+ QUIET=0
+ fi
+
+-if ! `(git status | grep -q "On branch") 2> /dev/null`; then
+- # If we don't have git, we can't work out what
+- # version this is. It must have been downloaded as a
+- # zip file. Github creates the zip file with all
+- # files dated from the last change: use the
+- # Makefile's modification time as a release number
+- release=zip-`stat -c "%y" Makefile | sed 's/ .*//'`
+-fi
+-
+-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
+- # generate the version info based on the tag
+- release=`(git describe --tags || git --describe || git describe --all --long) \
+- 2>/dev/null | tr -d '\n'`
+-
+- # Are there uncommitted changes?
+- git update-index --refresh --unmerged > /dev/null
+- if git diff-index --name-only HEAD | grep -v "^scripts/package" \
+- | read dummy; then
+- release="$release-dirty"
+- fi
+-fi
+-
++release=
+
+ if [ $QUIET -ne 1 ]; then
+ printf "#ifndef _VERSION_H_ \n"
diff --git a/net/sslh/files/sslh.in b/net/sslh/files/sslh.in
index e83dc677b242..65ae36515053 100644
--- a/net/sslh/files/sslh.in
+++ b/net/sslh/files/sslh.in
@@ -5,25 +5,23 @@
# sslh startup script
#
# PROVIDE: sslh
-# REQUIRE: login
+# REQUIRE: LOGIN FILESYSTEMS ldconfig sshd
# KEYWORD: shutdown
#
-# Add the following to /etc/rc.conf[.local] to enable this service
-#
+# Add the following to /etc/rc.conf[.local] to enable this service:
# sslh_enable="YES"
#
-# You can fine tune others variables too:
-# You can fine tune others variables too:
+# You can fine tune other variables too:
# sslh_mode="fork | select"
# fork: stable but slow performance
# select: new but high performance
-# sslh_fib: Routing table number
+# sslh_fib: routing table number
sslh_precmd() {
if command -v check_namevarlist > /dev/null 2>&1; then
check_namevarlist fib && return 0
fi
- sysctl net.fibs >/dev/null 2>&1 || return 0
+ sysctl net.fibs > /dev/null 2>&1 || return 0
sslh_fib=${sslh_fib:-"NONE"}
case "$sslh_fib" in
@@ -33,7 +31,7 @@ sslh_precmd() {
command="setfib -F ${sslh_fib} ${command}"
;;
esac
-}
+}
. /etc/rc.subr
@@ -47,8 +45,11 @@ sslh_enable=${sslh_enable:-"NO"}
sslh_mode=${sslh_mode:-"fork"}
required_files="%%PREFIX%%/etc/${name}.conf"
-for value in listening sshtarget ssltarget sshtimeout openvpntarget xmpptarget tinctarget;do
- eval "[ -n \"\${sslh_${value}}\" ]" && warn "${name}_${value} no more used: Configuration file available"
+
+for value in listening openvpntarget sshtarget sshtimeout ssltarget \
+ tinctarget xmpptarget; do
+ eval "[ -n \"\${sslh_${value}}\" ]" && \
+ warn "${name}_${value} no longer used: configuration file available"
done
command="%%PREFIX%%/sbin/${name}-${sslh_mode}"