blob: db833ab4d567521d2dc90bbca81b1f0e5e24e9ba (
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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
# Created by: gpalmer
# $FreeBSD$
PORTNAME= amanda
PORTVERSION= 2.5.1p3
PORTREVISION?= 7
PKGNAMESUFFIX?= -server
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= SF/amanda/amanda%20-%20stable/${PORTVERSION}
MAINTAINER= kuriyama@FreeBSD.org
COMMENT?= The Advanced Maryland Automatic Network Disk Archiver (server)
WRKSRC= ${WRKDIR}/amanda-${PORTVERSION}
SLAVEDIRS= misc/amanda25-client
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
USE_AUTOTOOLS= autoconf
USE_GMAKE= yes
USE_OPENSSL= yes
PATCH_STRIP=
CONFIGURE_ARGS= --libexecdir=${PREFIX}/libexec/amanda \
--with-amandahosts --with-fqdn \
--with-dump-honor-nodump --with-buffered-dump \
--disable-libtool --prefix=${PREFIX} \
--with-user=${AMANDA_USER} --with-group=${AMANDA_GROUP}
USE_LDCONFIG= yes
WANT_PERL= yes
SAMBA_PORT?= net/samba36
OPTIONS_DEFINE= GNUTAR SSH
OPTIONS_DEFAULT= SSH
GNUTAR_DESC= use GNU tar
SSH_DESC= Enable ssh-auth
AMANDA_USER?= operator
AMANDA_GROUP?= operator
AMANDA_GNUTAR_LISTDIR?= ${PREFIX}/var/amanda/gnutar-lists
PLIST_SUB= SHLIBVER=${PORTVERSION}
# amanda-server/amanda-client common part
.if defined (AMANDA_SERVER)
CONFIGURE_ARGS+= --with-index-server=${AMANDA_SERVER}
CONFIGURE_ARGS+= --with-tape-server=${AMANDA_SERVER}
.endif
.if defined (AMANDA_CONFIG)
CONFIGURE_ARGS+= --with-config=${AMANDA_CONFIG}
.endif
.if defined (AMANDA_UDPPORTRANGE)
CONFIGURE_ARGS+= --with-udpportrange=${AMANDA_UDPPORTRANGE}
.endif
# AMANDA_PORTRANGE is obsoleted. Use AMANDA_TCPPORTRANGE instead.
.if defined (AMANDA_PORTRANGE)
AMANDA_TCPPORTRANGE= ${AMANDA_PORTRANGE}
.endif
.if defined (AMANDA_TCPPORTRANGE)
CONFIGURE_ARGS+= --with-tcpportrange=${AMANDA_TCPPORTRANGE}
.endif
.if !defined(CLIENT_ONLY)
OPTIONS_DEFINE+= PLOT SAMBA MTX AESPIPE
PLOT_DESC= Eenable ploting, requires X11 libraries
SAMBA_DESC= Enable the use of smbclient
MTX_DESC= Enable the use of mtx changer scripts
AESPIPE_DESC= Enable encryption. Needed by amcrypt
.else
OPTIONS_DEFINE+= DUMP_SNAPSHOT
DUMP_SNAPSHOT_DESC= Use snapshot by using dump -L
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSSH}
CONFIGURE_ARGS+= --with-ssh-security
.endif
.if ${PORT_OPTIONS:MGNUTAR}
CONFIGURE_ARGS+=--with-gnutar-listdir=${AMANDA_GNUTAR_LISTDIR} \
--with-gnutar=${LOCALBASE}/bin/gtar
BUILD_DEPENDS= gtar:${PORTSDIR}/archivers/gtar
RUN_DEPENDS= gtar:${PORTSDIR}/archivers/gtar
.endif
# amanda-server part
.if !defined(CLIENT_ONLY)
pre-fetch:
@${ECHO} ""
@${ECHO} "You may use the following build options:"
@${ECHO} ""
@${ECHO} " AMANDA_SERVER=server to specify a server name"
@${ECHO} " The default is `uname -n`"
@${ECHO} " AMANDA_TAPE=tape to specify the default tape device"
@${ECHO} " The default is /dev/nrsa0"
@${ECHO} " AMANDA_CONFIG=config to specify the default configuration"
@${ECHO} " The default is user"
@${ECHO} " AMANDA_USER=user to specify the default user"
@${ECHO} " The default is operator"
@${ECHO} " AMANDA_GROUP=group to specify the default group"
@${ECHO} " The default is operator"
@${ECHO} " AMANDA_TCPPORTRANGE=low,high to restrict Amanda to TCP ports"
@${ECHO} " between low and high when connecting from the server"
@${ECHO} " to the client for data, messages, and indexing."
@${ECHO} " The default is no restriction on TCP ports."
@${ECHO} " AMANDA_UDPPORTRANGE=low,high to restrict Amanda to UDP ports"
@${ECHO} " between low and high when connecting from the client"
@${ECHO} " to the server. Use ports below 1024."
@${ECHO} " The default is no restriction on UDP ports."
@${ECHO} ""
post-patch:
@${REINPLACE_CMD} \
-e 's|^OPENSSL=.*$$|OPENSSL=${OPENSSLBASE}/bin/openssl|' \
${WRKSRC}/server-src/amcrypt-ossl.sh.in \
${WRKSRC}/server-src/amcrypt-ossl-asym.sh.in
USE_PERL5= yes
BUILD_DEPENDS+= ${LOCALBASE}/sbin/amrecover:${PORTSDIR}/misc/amanda25-client
RUN_DEPENDS+= ${LOCALBASE}/sbin/amrecover:${PORTSDIR}/misc/amanda25-client
NO_LATEST_LINK= yes
CONFLICTS= amanda-server-2.6.* amanda-server-3.*
CONFIGURE_ARGS+=--without-client
MAN8= amadmin.8 amaespipe.8 amcheck.8 \
amcheckdb.8 amcleanup.8 \
amcrypt.8 amcrypt-ossl-asym.8 amcrypt-ossl.8 amdd.8 \
amdump.8 amfetchdump.8 amflush.8 amgetconf.8 amlabel.8 ammt.8 \
amoverview.8 amreport.8 amrmtape.8 amstatus.8 \
amtape.8 amtoc.8 amverify.8 amverifyrun.8 amtapetype.8
.if ${PORT_OPTIONS:MPLOT}
BUILD_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
RUN_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
MAN8+= amplot.8
PLIST_SUB+= PLOT=''
.else
PLIST_SUB+= PLOT='@comment '
.endif
.if ${PORT_OPTIONS:MSAMBA}
BUILD_DEPENDS+= smbclient:${PORTSDIR}/${SAMBA_PORT}
RUN_DEPENDS+= smbclient:${PORTSDIR}/${SAMBA_PORT}
CONFIGURE_ARGS+= --with-smbclient=${LOCALBASE}/bin/smbclient
.endif
.if ${PORT_OPTIONS:MMTX}
BUILD_DEPENDS+= mtx:${PORTSDIR}/misc/mtx
RUN_DEPENDS+= mtx:${PORTSDIR}/misc/mtx
.endif
.if ${PORT_OPTIONS:MAESPIPE}
RUN_DEPENDS+= aespipe:${PORTSDIR}/security/aespipe
.endif
.if defined (AMANDA_TAPE)
CONFIGURE_ARGS+= --with-tape-device=${AMANDA_TAPE}
.endif
# amanda-client part
.else
pre-fetch:
@${ECHO} ""
@${ECHO} "You may use the following build options:"
@${ECHO} ""
@${ECHO} " AMANDA_SERVER=server to specify a server name"
@${ECHO} " The default is `uname -n`"
@${ECHO} " AMANDA_CONFIG=config to specify the default configuation"
@${ECHO} " The default is user"
@${ECHO} " AMANDA_GNUTAR_LISTDIR=dir to specify the directory that"
@${ECHO} " the gnutar index files should live in"
@${ECHO} " The default is /var/amanda/gnutar-lists"
@${ECHO} " AMANDA_USER=user to specify the default user"
@${ECHO} " The default is operator"
@${ECHO} " AMANDA_GROUP=group to specify the default group"
@${ECHO} " The default is operator"
@${ECHO} " AMANDA_TCPPORTRANGE=low,high to restrict Amanda to TCP ports"
@${ECHO} " between low and high when connecting from the server"
@${ECHO} " to the client for data, messages, and indexing."
@${ECHO} " The default is no restriction on TCP ports."
@${ECHO} " AMANDA_UDPPORTRANGE=low,high to restrict Amanda to UDP ports"
@${ECHO} " between low and high when connecting from the client"
@${ECHO} " to the server. Use ports below 1024."
@${ECHO} " The default is no restriction on UDP ports."
@${ECHO} ""
NO_LATEST_LINK= yes
CONFLICTS= amanda-client-2.6.* amanda-client-3.*
CONFIGURE_ARGS+=--without-server
MAN5= amanda.conf.5 amanda-client.conf.5
MAN8= amanda.8 amrecover.8 amrestore.8
post-install:
${MKDIR} ${PREFIX}/share/examples/amanda
${CP} -R ${WRKSRC}/example/amanda.conf \
${WRKSRC}/example/chg-multi.conf \
${WRKSRC}/example/chg-scsi.conf \
${WRKSRC}/example/disklist \
${PREFIX}/share/examples/amanda
${MKDIR} ${AMANDA_GNUTAR_LISTDIR}
${CHOWN} ${AMANDA_USER}:${AMANDA_GROUP} ${AMANDA_GNUTAR_LISTDIR}
${TOUCH} /etc/amandates
${CHOWN} ${AMANDA_USER}:${AMANDA_GROUP} /etc/amandates
.if ${PORT_OPTIONS:MDUMP_SNAPSHOT}
EXTRA_PATCHES= ${FILESDIR}/extra-patch-sendbackup-dump.c
.endif
.endif
# Maintainer TODO:
# o amanda-server installs lib/libamandad.a which should be handled by
# amanda-client only.
.include <bsd.port.mk>
|