aboutsummaryrefslogtreecommitdiff
path: root/net/keepalived
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2005-09-08 19:55:01 +0000
committerClement Laforet <clement@FreeBSD.org>2005-09-08 19:55:01 +0000
commitdfdd2dbf2563f0a6c6c2ce824574dcec5d86e876 (patch)
tree7855b5b8da52178de06a9edc58738b587adb6497 /net/keepalived
parente304c3dc200348dc3d0bb1be5c8c1839ae96a2e6 (diff)
downloadports-dfdd2dbf2563f0a6c6c2ce824574dcec5d86e876.tar.gz
ports-dfdd2dbf2563f0a6c6c2ce824574dcec5d86e876.zip
Notes
Diffstat (limited to 'net/keepalived')
-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
6 files changed, 142 insertions, 0 deletions
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."