/
ports.netmap-fwd.shar
151 lines (150 loc) · 4.18 KB
/
ports.netmap-fwd.shar
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# net/netmap-fwd/
# net/netmap-fwd/Makefile
# net/netmap-fwd/distinfo
# net/netmap-fwd/files
# net/netmap-fwd/files/patch-util.h
# net/netmap-fwd/files/netmapfwd.in
# net/netmap-fwd/files/patch-util.c
# net/netmap-fwd/pkg-descr
#
echo c - net/netmap-fwd/
mkdir -p net/netmap-fwd/ > /dev/null 2>&1
echo x - net/netmap-fwd/Makefile
sed 's/^X//' >net/netmap-fwd/Makefile << '2ee126d24e56f37f3f4a100f28afe4b4'
X# $FreeBSD: head/net/pimd/Makefile 385640 2015-05-07 17:26:05Z mat $
X
XPORTNAME= netmap-fwd
XPORTVERSION= 0.2
XCATEGORIES= net
X
XMAINTAINER= olivier@FreeBSD.org
XCOMMENT= IPv4 router over netmap for FreeBSD
X
XLICENSE= BSD2CLAUSE
X
XLIB_DEPENDS= libevent.so:devel/libevent \
X libucl.so:textproc/libucl
X
XUSE_GITHUB= yes
XGH_ACCOUNT= Netgate
XGH_PROJECT= ${PORTNAME}
XGH_TAGNAME= 6245f9a
XUSE_RC_SUBR= netmapfwd
X
XPLIST_FILES= sbin/${PORTNAME} \
X etc/${PORTNAME}.conf
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin
X ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc
X
X.include <bsd.port.mk>
2ee126d24e56f37f3f4a100f28afe4b4
echo x - net/netmap-fwd/distinfo
sed 's/^X//' >net/netmap-fwd/distinfo << '82061fb11c5bfb28e5385fce1907f03b'
XTIMESTAMP = 1484390926
XSHA256 (Netgate-netmap-fwd-0.2-6245f9a_GH0.tar.gz) = 68f372ddaae074885018c6fd08001e7313da9eed95d7530c6a9f0b2d1e1be75f
XSIZE (Netgate-netmap-fwd-0.2-6245f9a_GH0.tar.gz) = 1368183
82061fb11c5bfb28e5385fce1907f03b
echo c - net/netmap-fwd/files
mkdir -p net/netmap-fwd/files > /dev/null 2>&1
echo x - net/netmap-fwd/files/patch-util.h
sed 's/^X//' >net/netmap-fwd/files/patch-util.h << '69b7616cf00a3bb1e75261dbd0245ad6'
X--- util.h.orig 2017-01-15 08:26:49 UTC
X+++ util.h
X@@ -26,11 +26,11 @@
X */
X
X #define BUFSZ 256
X-#define DPRINTF(_fmt, args...) if (verbose) dprintf(_fmt, ## args)
X+#define DPRINTF(_fmt, args...) if (verbose) ddprintf(_fmt, ## args)
X
X extern int verbose;
X
X-int dprintf(const char *, ...);
X+int ddprintf(const char *, ...);
X int printf_buf(char **, int *, int *, const char *, ...);
X void printb(char **, int *, int *, const char *, unsigned, const char *);
X int pidfile_create(const char *);
69b7616cf00a3bb1e75261dbd0245ad6
echo x - net/netmap-fwd/files/netmapfwd.in
sed 's/^X//' >net/netmap-fwd/files/netmapfwd.in << '0c4ad096a4c2f3341f116edbd68d2d53'
X#!/bin/sh
X#
X# PROVIDE: netmapfwd
X# REQUIRE: DAEMON
X#
X# Add the following line to /etc/rc.conf to enable netmap-fwd:
X#
X# netmapfwd_enable="YES"
X# netmapfwd_ifaces="<if1> <if2>..."
X#
X
X. /etc/rc.subr
X
Xname=netmapfwd
Xrcvar=netmapfwd_enable
X
X# read configuration
Xload_rc_config ${name}
X
X# Default values
Xnetmapfwd_enable=${netmapfwd_enable:-"NO"}
Xnetmapfwd_ifaces=${netmapfwd_ifaces:-} # netmap compliant ethernet interface(s)
X
Xnetmapfwd_precmd ()
X{
X if [ -z "${netmapfwd_ifaces}" ]; then
X warn "if name (netmapfwd_ifaces) not configured"
X return 1
X fi
X
X ifaces=
X for iface in ${netmapfwd_ifaces}; do
X ifaces="${ifaces} ${iface}"
X done
X
X rc_flags="${rc_flags} ${ifaces}"
X}
X
Xnetmapfwd_start ()
X{
X /usr/sbin/daemon ${command} ${rc_flags}
X}
X
Xpidfile=/var/run/netmap-fwd.pid
Xcommand="%%PREFIX%%/sbin/netmap-fwd"
Xrequired_files="%%PREFIX%%/etc/netmap-fwd.conf"
Xstart_precmd=${name}_precmd
Xstart_cmd="netmapfwd_start"
X
Xrun_rc_command "$1"
0c4ad096a4c2f3341f116edbd68d2d53
echo x - net/netmap-fwd/files/patch-util.c
sed 's/^X//' >net/netmap-fwd/files/patch-util.c << 'debcb07a812258deef170214adc4d395'
X--- util.c.orig 2017-01-15 08:26:45 UTC
X+++ util.c
X@@ -40,7 +40,7 @@
X #define MAXBUFSZ (BUFSZ * 1024)
X
X int
X-dprintf(const char *fmt, ...)
X+ddprintf(const char *fmt, ...)
X {
X char tmp[MAXBUFSZ];
X int expired, len;
debcb07a812258deef170214adc4d395
echo x - net/netmap-fwd/pkg-descr
sed 's/^X//' >net/netmap-fwd/pkg-descr << 'ab5b7cf3f6fc92739f384c42c931e0eb'
XAn IPv4 router over netmap for FreeBSD
X
XWWW: https://github.com/NetgateUSA/netmap-fwd
ab5b7cf3f6fc92739f384c42c931e0eb
exit