summaryrefslogtreecommitdiffstats
path: root/net/ipvs/Makefile
blob: af783c26d853b14482e3216744c421d7d9fac574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# New ports collection makefile for:	ipvs
# Date created:		Jun 11 2005
# Whom:			clement@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=	ipvs
PORTVERSION=	0.4.0
PORTREVISION=	2
CATEGORIES=	net
MASTER_SITES=	http://www.cultdeadsheep.org/~clement/FreeBSD/ipvs/
DISTNAME=	ipvs-${PORTVERSION}_${PORTREVISION}

MAINTAINER=	clement@FreeBSD.org
COMMENT=	FreeBSD port of Linux Virtual Server

#WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
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"


.if !defined(SYSTEM_PATCHED)
.if ${OSVERSION} < 503001 || defined(PACKAGE_BUILDING)
IGNORE=	Does not compile. If your system is patched to support ipvs, please\
	define SYSTEM_PATCHED
.elif ${OSVERSION} == 503001
FREEBSD_VERSION=	5.3-RELEASE
.elif (${OSVERSION} == 504000 || defined(TRY_STABLE))
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
.else
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
.endif
.endif

ONLY_FOR_ARCHS=		i386

patch-system: extract
	@${FIND} ${WRKSRC}/patch/${FREEBSD_VERSION} -type f \
		-name "*.patch" -exec ${PATCH} -p0 -d ${SRCDIR} -i {} \;

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud