aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2016-09-14 12:06:59 +0800
committervanilla <vanilla@FreeBSD.org>2016-09-14 12:06:59 +0800
commita75bff11fac6b07652649ea3288773112dcb37df (patch)
tree9ce0c90f0e929bec150c8cae24c359729547404a
parent4605820b7a9fc149df842e892cceba87cb1f4703 (diff)
downloadfreebsd-ports-graphics-a75bff11fac6b07652649ea3288773112dcb37df.tar.gz
freebsd-ports-graphics-a75bff11fac6b07652649ea3288773112dcb37df.tar.zst
freebsd-ports-graphics-a75bff11fac6b07652649ea3288773112dcb37df.zip
Add fabio 1.2.1, zero-conf load balancing HTTP(S) router managed by
Consul. PR: 210540 Submitted by: stl@ossuary.net
-rw-r--r--www/Makefile1
-rw-r--r--www/fabio/Makefile44
-rw-r--r--www/fabio/distinfo3
-rw-r--r--www/fabio/files/fabio.in43
-rw-r--r--www/fabio/pkg-descr4
-rw-r--r--www/fabio/pkg-plist2
6 files changed, 97 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 84e27b7d711..2c556b8944e 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -154,6 +154,7 @@
SUBDIR += erwn
SUBDIR += eventum
SUBDIR += extjs
+ SUBDIR += fabio
SUBDIR += fancybox
SUBDIR += faup
SUBDIR += fcgi
diff --git a/www/fabio/Makefile b/www/fabio/Makefile
new file mode 100644
index 00000000000..74aa04a3a50
--- /dev/null
+++ b/www/fabio/Makefile
@@ -0,0 +1,44 @@
+# $FreeBSD$
+
+PORTNAME= fabio
+PORTVERSION= 1.2.1
+DISTVERSIONPREFIX= v
+CATEGORIES= www
+
+MAINTAINER= stl@ossuary.net
+COMMENT= Zero-conf load balancing HTTP(S) router managed by Consul
+
+LICENSE= MIT
+
+USES= go
+USE_GITHUB= yes
+GH_ACCOUNT= eBay:DEFAULT
+GH_PROJECT= fabio
+
+USE_RC_SUBR= fabio
+
+USERS= nobody
+GROUPS= nobody
+
+do-build:
+ @${MKDIR} ${WRKSRC}/src/github.com/eBay/fabio
+
+.for src in .gitignore .travis.yml CHANGELOG.md Dockerfile LICENSE Makefile \
+ README.md Vagrantfile admin build cert config demo exit fabio.png \
+ fabio.properties listen.go listen_test.go main.go metrics proxy \
+ registry route routes.txt vendor
+ @${MV} ${WRKSRC}/${src} \
+ ${WRKSRC}/src/github.com/eBay/fabio
+.endfor
+
+ @cd ${WRKSRC}/src/github.com/eBay/fabio; \
+ ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x \
+ -ldflags "-X main.GitDescribe=v${PORTVERSION}" -o bin/fabio
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/eBay/fabio/bin/fabio \
+ ${STAGEDIR}${PREFIX}/sbin/fabio
+ ${INSTALL_DATA} ${WRKSRC}/src/github.com/eBay/fabio/fabio.properties \
+ ${STAGEDIR}${PREFIX}/etc/fabio.properties.sample
+
+.include <bsd.port.mk>
diff --git a/www/fabio/distinfo b/www/fabio/distinfo
new file mode 100644
index 00000000000..417ecaeda6b
--- /dev/null
+++ b/www/fabio/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1473153824
+SHA256 (eBay-fabio-v1.2.1_GH0.tar.gz) = aaac0db2ca606f1029d6fab9364f06850de620d1b73fe8bd459b524ed739f780
+SIZE (eBay-fabio-v1.2.1_GH0.tar.gz) = 368826
diff --git a/www/fabio/files/fabio.in b/www/fabio/files/fabio.in
new file mode 100644
index 00000000000..a50f331ad04
--- /dev/null
+++ b/www/fabio/files/fabio.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+#
+# PROVIDE: fabio
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# fabio_enable (bool): Set to NO by default.
+# Set it to YES to enable fabio.
+# fabio_user (user): Set user to run fabio.
+# Default is "nobody".
+# fabio_group (group): Set group to run fabio.
+# Default is "nobody".
+
+. /etc/rc.subr
+
+name=fabio
+rcvar=fabio_enable
+
+load_rc_config $name
+
+: ${fabio_enable:="NO"}
+: ${fabio_user:="nobody"}
+: ${fabio_group:="nobody"}
+
+pidfile=/var/run/fabio.pid
+procname="%%PREFIX%%/sbin/fabio"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} ${procname} -cfg %%PREFIX%%/etc/fabio.properties"
+
+start_precmd=fabio_startprecmd
+
+fabio_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${fabio_user} -g ${fabio_group} /dev/null ${pidfile};
+ fi
+}
+
+run_rc_command "$1"
diff --git a/www/fabio/pkg-descr b/www/fabio/pkg-descr
new file mode 100644
index 00000000000..2584bf155aa
--- /dev/null
+++ b/www/fabio/pkg-descr
@@ -0,0 +1,4 @@
+A fast, modern, zero-conf load balancing HTTP(S) router for deploying
+microservices managed by consul.
+
+https://github.com/eBay/fabio
diff --git a/www/fabio/pkg-plist b/www/fabio/pkg-plist
new file mode 100644
index 00000000000..30096f42516
--- /dev/null
+++ b/www/fabio/pkg-plist
@@ -0,0 +1,2 @@
+@sample etc/fabio.properties.sample
+sbin/fabio