2005-06-11 16:52:40 +00:00
|
|
|
# New ports collection makefile for: ipvs
|
|
|
|
# Date created: Jun 11 2005
|
|
|
|
# Whom: clement@FreeBSD.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= ipvs
|
|
|
|
PORTVERSION= 0.4.0
|
2005-08-25 09:58:13 +00:00
|
|
|
PORTREVISION= 2
|
2005-06-11 16:52:40 +00:00
|
|
|
CATEGORIES= net
|
2005-08-24 19:55:33 +00:00
|
|
|
MASTER_SITES= http://www.cultdeadsheep.org/~clement/FreeBSD/ipvs/
|
|
|
|
DISTNAME= ipvs-${PORTVERSION}_${PORTREVISION}
|
2005-06-11 16:52:40 +00:00
|
|
|
|
|
|
|
MAINTAINER= clement@FreeBSD.org
|
|
|
|
COMMENT= FreeBSD port of Linux Virtual Server
|
|
|
|
|
2005-08-24 19:55:33 +00:00
|
|
|
#WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2005-06-11 16:52:40 +00:00
|
|
|
SRCDIR?= /usr/src
|
|
|
|
|
|
|
|
MAN8= ipvsadm.8 ipvsadm-restore.8 ipvsadm-save.8
|
|
|
|
MAKE_ENV+= MKDIR="${MKDIR}" KMODDIR="/boot/modules"
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_CMD} "LVS on FreeBSD works only with 5.3-RELEASE and 5.4-RELEASE."
|
|
|
|
@${ECHO_CMD} "However it may work on 5-STABLE. If you are running FreeBSD 5.4-STABLE, define"
|
|
|
|
@${ECHO_CMD} "TRY_STABLE and check if patches apply correctly to your src tree"
|
|
|
|
@${ECHO_CMD} "To build ipvs, I strongly encourage you to follow these instructions"
|
|
|
|
@${ECHO_CMD} " 1. checkout supported src tree"
|
|
|
|
@${ECHO_CMD} " 2. run \"make patch-system\""
|
|
|
|
@${ECHO_CMD} " 3. configure and build your kernel. (you need support of NetFilter"
|
|
|
|
@${ECHO_CMD} " sockopt, add \"options NF_SOCKOPT\")"
|
|
|
|
@${ECHO_CMD} " 4. Install your freshly compiled kernel"
|
|
|
|
@${ECHO_CMD} " 5. install the port"
|
|
|
|
@${ECHO_CMD} " 6. reboot your system"
|
|
|
|
|
2005-06-12 19:10:18 +00:00
|
|
|
|
|
|
|
.if !defined(SYSTEM_PATCHED)
|
2005-08-24 19:55:33 +00:00
|
|
|
.if ${OSVERSION} < 503001 || defined(PACKAGE_BUILDING)
|
2005-06-12 19:10:18 +00:00
|
|
|
IGNORE= Does not compile. If your system is patched to support ipvs, please\
|
|
|
|
define SYSTEM_PATCHED
|
|
|
|
.elif ${OSVERSION} == 503001
|
2005-08-24 19:55:33 +00:00
|
|
|
FREEBSD_VERSION= 5.3-RELEASE
|
2005-06-12 19:10:18 +00:00
|
|
|
.elif (${OSVERSION} == 504000 || defined(TRY_STABLE))
|
2005-08-24 19:55:33 +00:00
|
|
|
FREEBSD_VERSION= 5.4-RELEASE
|
|
|
|
.elif (${OSVERSION} >= 600029 || defined(TRY_STABLE6))
|
|
|
|
FREEBSD_VERSION= 6.0-RELEASE
|
|
|
|
.elif (${OSVERSION} >= 700000 || defined(TRY_CURRENT))
|
|
|
|
FREEBSD_VERSION= 7.0-CURRENT
|
2005-06-12 19:10:18 +00:00
|
|
|
.else
|
2005-08-24 19:55:33 +00:00
|
|
|
IGNORE= is designed orginally for 5.3-RELEASE and 5.4-RELEASE, define TRY_STABLE\
|
|
|
|
to test it on 5-STABLE, TRY_STABLE6 on 6-STABLE or TRY_CURRENT\
|
|
|
|
on 7.0-CURRENT
|
2005-06-12 19:10:18 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
|
|
|
patch-system: extract
|
2005-08-24 19:55:33 +00:00
|
|
|
@${FIND} ${WRKSRC}/patch/${FREEBSD_VERSION} -type f \
|
2005-06-12 19:10:18 +00:00
|
|
|
-name "*.patch" -exec ${PATCH} -p0 -d ${SRCDIR} -i {} \;
|
|
|
|
|
2005-06-11 16:52:40 +00:00
|
|
|
.include <bsd.port.post.mk>
|