aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2005-09-09 03:55:01 +0800
committerclement <clement@FreeBSD.org>2005-09-09 03:55:01 +0800
commit549489b4ec03dccf474f5ad9d00afe703d608ac5 (patch)
treeb1edbf6e84e5fb3f4256104af8170d2dfb8b52e9 /net
parent0e84d684fbe13434ba15d58a2161fa122d41c66e (diff)
downloadfreebsd-ports-gnome-549489b4ec03dccf474f5ad9d00afe703d608ac5.tar.gz
freebsd-ports-gnome-549489b4ec03dccf474f5ad9d00afe703d608ac5.tar.zst
freebsd-ports-gnome-549489b4ec03dccf474f5ad9d00afe703d608ac5.zip
- Add a FreeBSD port of keepalived daemon, based on version 1.1.11
Keepalived is an ipvs wrapper and a service health-checker. FreeBSD port does not support keepalived VRRP stack, but it can be easily replaced by carp interfaces. WWW: http://www.keepalived.org/
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/keepalived/Makefile47
-rw-r--r--net/keepalived/distinfo2
-rw-r--r--net/keepalived/files/keepalived.sh.in33
-rw-r--r--net/keepalived/files/patch-keepalived__Makefile.in25
-rw-r--r--net/keepalived/pkg-descr5
-rw-r--r--net/keepalived/pkg-plist30
7 files changed, 143 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index dc747677fbba..5a591d7ef6dd 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -289,6 +289,7 @@
SUBDIR += jumpgate
SUBDIR += jwhois
SUBDIR += kdenetwork3
+ SUBDIR += keepalived
SUBDIR += kf
SUBDIR += kissd
SUBDIR += kmerlin
diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile
new file mode 100644
index 000000000000..2c58b380f8cd
--- /dev/null
+++ b/net/keepalived/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: keepalived
+# Date created: Aug 25 2005
+# Whom: clement@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= keepalived
+PORTVERSION= 1.1.11
+CATEGORIES= net
+MASTER_SITES= http://www.cultdeadsheep.org/~clement/FreeBSD/ipvs/
+DISTNAME= ${PORTNAME}-FreeBSD-${PORTVERSION}
+
+MAINTAINER= clement@FreeBSD.org
+COMMENT= A monitoring daemon for ipvs clusters
+
+LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
+BUILD_DEPENDS= ${LOCALBASE}/lib/libipvs.a:${PORTSDIR}/net/ipvs
+
+USE_GMAKE= YES
+GNU_CONFIGURE= YES
+USE_OPENSSL= YES
+USE_RC_SUBR= keepalived.sh
+USE_REINPLACE= YES
+
+LDFLAGS+= -lipvs -L${LOCALBASE}/lib
+
+CONFIGURE_ARGS+= --with-kernel-dir=${LOCALBASE} \
+ --mandir=${PREFIX}
+CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
+
+MAN1= genhash.1
+MAN5= keepalived.conf.5
+MAN8= keepalived.8
+
+post-patch:
+ @${REINPLACE_CMD} 's,\(#define CONF\).*,\
+ \1 "${PREFIX}/etc/keepalived/keepalived.conf",' \
+ ${WRKSRC}/lib/parser.h
+
+post-install:
+ @${MKDIR} ${PREFIX}/etc/${PORTNAME}
+ @if [ ! -e ${PREFIX}/etc/${PORTNAME}/keepalived.conf ] ; then \
+ ${INSTALL_DATA} ${EXAMPLESDIR}/keepalived.conf \
+ ${PREFIX}/etc/${PORTNAME}/keepalived.conf; fi
+
+.include <bsd.port.mk>
diff --git a/net/keepalived/distinfo b/net/keepalived/distinfo
new file mode 100644
index 000000000000..62ddf87a7da9
--- /dev/null
+++ b/net/keepalived/distinfo
@@ -0,0 +1,2 @@
+MD5 (keepalived-FreeBSD-1.1.11.tar.gz) = 277e88e668c3e21b52b3a28672619ae0
+SIZE (keepalived-FreeBSD-1.1.11.tar.gz) = 213163
diff --git a/net/keepalived/files/keepalived.sh.in b/net/keepalived/files/keepalived.sh.in
new file mode 100644
index 000000000000..7b931d26e749
--- /dev/null
+++ b/net/keepalived/files/keepalived.sh.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: keepalived
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable apache2:
+# apache2_keepalived (bool): Set to "NO" by default.
+# Set it to "YES" to enable keepalived
+# apache2_profiles (string): Undefined by default. Define here your profiles.
+
+. %%RC_SUBR%%
+
+name="keepalived"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/keepalived"
+pidfile="/var/run/keepalived.pid"
+required_files=%%PREFIX%%/etc/keepalived/keepalived.conf
+
+[ -z "${keepalived_enable}" ] && keepalived_enable="NO"
+
+load_rc_config $name
+
+sig_reload=SIGHUP
+
+extra_commands="reload"
+run_rc_command "$1"
diff --git a/net/keepalived/files/patch-keepalived__Makefile.in b/net/keepalived/files/patch-keepalived__Makefile.in
new file mode 100644
index 000000000000..eff7630b3f86
--- /dev/null
+++ b/net/keepalived/files/patch-keepalived__Makefile.in
@@ -0,0 +1,25 @@
+--- keepalived/Makefile.in.orig Sat Aug 20 16:54:34 2005
++++ keepalived/Makefile.in Thu Sep 8 21:25:25 2005
+@@ -16,6 +16,7 @@
+ sysconfdir = @sysconfdir@
+ init_script = etc/init.d/keepalived.init
+ conf_file = etc/keepalived/keepalived.conf
++examplesdir = @prefix@/share/examples
+
+ CC = @CC@
+ STRIP = @STRIP@
+@@ -103,11 +104,9 @@
+ install:
+ install -d $(DESTDIR)$(sbindir)
+ install -m 700 $(BIN)/$(EXEC) $(DESTDIR)$(sbindir)/
+- install -d $(DESTDIR)$(sysconfdir)/init.d
+- install -m 755 $(init_script) $(DESTDIR)$(sysconfdir)/init.d/keepalived
+- install -d $(DESTDIR)$(sysconfdir)/keepalived/samples
+- install -m 644 $(conf_file) $(DESTDIR)$(sysconfdir)/keepalived/
+- install -m 644 ../doc/samples/* $(DESTDIR)$(sysconfdir)/keepalived/samples/
++ install -d $(DESTDIR)$(examplesdir)/keepalived/samples
++ install -m 644 $(conf_file) $(DESTDIR)$(examplesdir)/keepalived/
++ install -m 644 ../doc/samples/* $(DESTDIR)$(examplesdir)/keepalived/samples/
+ install -d $(DESTDIR)@mandir@/man/man5
+ install -d $(DESTDIR)@mandir@/man/man8
+ install -m 644 ../doc/man/man5/keepalived.conf.5 $(DESTDIR)@mandir@/man/man5
diff --git a/net/keepalived/pkg-descr b/net/keepalived/pkg-descr
new file mode 100644
index 000000000000..f60e132f02d9
--- /dev/null
+++ b/net/keepalived/pkg-descr
@@ -0,0 +1,5 @@
+Keepalived is an ipvs wrapper and a service health-checker. FreeBSD
+port does not support keepalived VRRP stack, but it can be easily
+replaced by carp interfaces.
+
+WWW: http://www.keepalived.org/
diff --git a/net/keepalived/pkg-plist b/net/keepalived/pkg-plist
new file mode 100644
index 000000000000..9158e14560b6
--- /dev/null
+++ b/net/keepalived/pkg-plist
@@ -0,0 +1,30 @@
+@exec mkdir -p %D/etc/keepalived 2> /dev/null
+@unexec if cmp -s %D/etc/keepalived/keepalived.conf %D/%%EXAMPLESDIR%%/keepalived.conf; then rm -f %D/etc/keepalived/keepalived.conf; fi
+bin/genhash
+sbin/keepalived
+%%EXAMPLESDIR%%/samples/client.pem
+%%EXAMPLESDIR%%/samples/dh1024.pem
+%%EXAMPLESDIR%%/samples/keepalived.conf.HTTP_GET.port
+%%EXAMPLESDIR%%/samples/keepalived.conf.SMTP_CHECK
+%%EXAMPLESDIR%%/samples/keepalived.conf.SSL_GET
+%%EXAMPLESDIR%%/samples/keepalived.conf.fwmark
+%%EXAMPLESDIR%%/samples/keepalived.conf.inhibit
+%%EXAMPLESDIR%%/samples/keepalived.conf.misc_check
+%%EXAMPLESDIR%%/samples/keepalived.conf.misc_check_arg
+%%EXAMPLESDIR%%/samples/keepalived.conf.sample
+%%EXAMPLESDIR%%/samples/keepalived.conf.status_code
+%%EXAMPLESDIR%%/samples/keepalived.conf.track_interface
+%%EXAMPLESDIR%%/samples/keepalived.conf.virtual_server_group
+%%EXAMPLESDIR%%/samples/keepalived.conf.virtualhost
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp.lvs_syncd
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp.routes
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp.scripts
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp.static_ipaddress
+%%EXAMPLESDIR%%/samples/keepalived.conf.vrrp.sync
+%%EXAMPLESDIR%%/samples/root.pem
+%%EXAMPLESDIR%%/samples/sample.misccheck.smbcheck.sh
+%%EXAMPLESDIR%%/keepalived.conf
+@dirrm %%EXAMPLESDIR%%/samples
+@dirrm %%EXAMPLESDIR%%
+@unexec rmdir %D/etc/keepalived 2> /dev/null || echo "===> If you plan to do not reinstall keepalived, you can safely remove %D/etc/keepalived."