blob: c4d717d340bee707f4fcd3f8bec0ad24a00f1455 (
plain) (
blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# New ports collection makefile for: pf_freebsd
# Date created: 08 May 2003
# Whom: Max Laier <max@love2party.net>
#
# $FreeBSD$
#
PORTNAME= pf_freebsd
PORTVERSION= 2.03
CATEGORIES= security ipv6
MASTER_SITES= http://pf4freebsd.love2party.net/
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
PKGNAMESUFFIX= -altq
.endif
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= max@love2party.net
COMMENT= OpenBSD pf as a kldmodule
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
IS_INTERACTIVE= yes
.endif
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/pf.sh.sample
SAMPLE_CONFIG= ${PREFIX}/etc/pf.conf.default
SAMPLE_PFOS= ${PREFIX}/etc/pf.os
MAN1= pftcpdump.1
MAN4= pf.4 pflog.4 pfsync.4
MAN5= pf.conf.5 pf.os.5
MAN8= ftp-proxy.8 pfctl.8 pflogd.8
MANCOMPRESSED= maybe
KMODDIR?= ${PREFIX}/modules
MAKE_ARGS= KMODDIR="${KMODDIR}" MANDIR="${PREFIX}/man/man"
SRC_BASE?= /usr/src
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
SYS_ALTQ?= ${SRC_BASE}/sys.altq
MAKE_ARGS+= WITH_ALTQ="yes" SYS_ALTQ="${SYS_ALTQ}"
PLIST_SUB+= WITH_ALTQ=""
.else
PLIST_SUB+= WITH_ALTQ="@comment "
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
IGNORE= "Only for 5.0 and above"
.endif
.if ${OSVERSION} > 502105
IGNORE= "pf moved to the base system, please build it from there"
.endif
.if !exists(${SRC_BASE}/sys/Makefile) && \
(defined(WITH_ALTQ) && !exists(${SYS_ALTQ}/Makefile))
IGNORE= "Kernel source files required"
.endif
.if !defined(WITH_ALTQ) || (${WITH_ALTQ} != "yes")
pre-fetch:
@${ECHO_MSG} "======================================================="
@${ECHO_MSG} "* If you have ALTQ support from: *"
@${ECHO_MSG} "* http://www.nipsi.de/altq/index.html or *"
@${ECHO_MSG} "* http://www.rofug.ro/projects/freebsd-altq/ *"
@${ECHO_MSG} "* You can define WITH_ALTQ=yes to make use of it *"
@${ECHO_MSG} "* Please define SYS_ALTQ to point to the patched src *"
@${ECHO_MSG} "* *"
@${ECHO_MSG} "* e.g.: make WITH_ALTQ=yes SYS_ALTQ=/usr/src/sys.altq *"
@${ECHO_MSG} "* *"
@${ECHO_MSG} "======================================================="
@sleep 2
.endif
post-patch:
@${CP} ${WRKSRC}/pfctl/pfctl_parser.h \
${WRKSRC}/pfctl/pfctl_parser.h.orig
@${SED} -e 's!%%PREFIX%%!${PREFIX}!' \
${WRKSRC}/pfctl/pfctl_parser.h.orig > \
${WRKSRC}/pfctl/pfctl_parser.h
pre-su-install:
${MKDIR} ${KMODDIR}
${MKDIR} ${PREFIX}/include/pf
${MKDIR} ${PREFIX}/include/pf/net
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
${MKDIR} ${PREFIX}/include/pf/altq
.endif
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
post-install:
${ECHO_MSG} "Installing include files ..."
${INSTALL_DATA} ${WRKSRC}/include/net/pfvar.h \
${PREFIX}/include/pf/net
${INSTALL_DATA} ${WRKSRC}/include/net/if_pflog.h \
${PREFIX}/include/pf/net
${INSTALL_DATA} ${WRKSRC}/include/net/if_pfsync.h \
${PREFIX}/include/pf/net
.if defined(WITH_ALTQ) && (${WITH_ALTQ} == "yes")
${INSTALL_DATA} ${WRKSRC}/include/altq/*.h \
${PREFIX}/include/pf/altq
.endif
@if [ -f ${WRKSRC}/man/pf.4.gz ]; then \
${ECHO_MSG} "Installing pftcpdump(1) man page."; \
${GZIP_CMD} -cn ${WRKSRC}/freebsd_tcpdump/tcpdump.1 > \
${WRKSRC}/freebsd_tcpdump/tcpdump.1.gz ; \
${INSTALL_MAN} ${WRKSRC}/freebsd_tcpdump/tcpdump.1.gz \
${PREFIX}/man/man1/pftcpdump.1.gz ; \
else \
${ECHO_MSG} "Installing pftcpdump(1) man page."; \
${INSTALL_MAN} ${WRKSRC}/freebsd_tcpdump/tcpdump.1 \
${PREFIX}/man/man1/pftcpdump.1 ; \
fi
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file." ; \
${INSTALL_SCRIPT} ${FILESDIR}/pf.sh.sample \
${STARTUP_SCRIPT} ; \
fi
@if [ ! -f ${SAMPLE_CONFIG} ]; then \
${ECHO_MSG} "Installing ${SAMPLE_CONFIG} config file." ; \
${INSTALL_DATA} ${FILESDIR}/pf.conf.default \
${SAMPLE_CONFIG}; \
fi
@if [ ! -f ${SAMPLE_PFOS} ]; then \
${ECHO_MSG} "Installing ${SAMPLE_PFOS} config file."; \
${INSTALL_DATA} ${FILESDIR}/pf.os.default \
${SAMPLE_PFOS}; \
fi
${SED} -e 's!%%PREFIX%%!${PREFIX}!' ${PKGMESSAGE}
.include <bsd.port.post.mk>
|