1 # New ports collection makefile for: amanda
2 # Date created: 28th Feb 1995
5 # $FreeBSD: ports/misc/amanda-server/Makefile,v 1.131 2013/01/31 19:48:36 svnexp Exp $
12 MASTER_SITES= SF/amanda/amanda%20-%20stable/${PORTVERSION}
13 PKGNAMESUFFIX?= -server
15 MAINTAINER= kuriyama@FreeBSD.org
16 COMMENT?= The Advanced Maryland Automatic Network Disk Archiver (server)
18 RUN_DEPENDS= perl-amanda:${PORTSDIR}/misc/amanda-perl-wrapper
19 BUILD_DEPENDS= perl-amanda:${PORTSDIR}/misc/amanda-perl-wrapper
21 WRKSRC= ${WRKDIR}/amanda-${PORTVERSION}
22 SLAVEDIRS= misc/amanda-client
24 LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
26 USE_GNOME= pkgconfig glib20
31 CONFIGURE_ARGS= --libexecdir=${PREFIX}/libexec/amanda \
32 --without-amlibexecdir \
33 --with-amandahosts --with-fqdn \
34 --with-dump-honor-nodump \
37 --with-user=${USERS} --with-group=${AMANDA_GROUP} \
38 --with-bsdtcp-security --with-bsdudp-security \
40 CONFIGURE_ENV= PERL=${LOCALBASE}/bin/perl-amanda
41 PKG_MESSAGE= ${WRKDIR}/pkg-message
42 SUB_FILES= pkg-message
43 SUB_LIST= PORTSDIR=${PORTSDIR}
45 OPTIONS= GNUTAR "use GNU tar" on
47 .include <bsd.port.pre.mk>
49 .if defined(AMANDA_USER)
54 .if !defined(AMANDA_GROUP)
57 GROUPS?= operator amanda
59 AMANDA_GNUTAR_LISTDIR?= ${PREFIX}/var/amanda/gnutar-lists
60 AMANDA_DATES?= ${PREFIX}/var/amanda/amandates
61 PLIST_SUB= SHLIBVER=${PORTVERSION} AMANDA_DATES=${AMANDA_DATES}
63 # amanda-server/amanda-client common part
64 .if defined (AMANDA_SERVER)
65 CONFIGURE_ARGS+= --with-index-server=${AMANDA_SERVER}
66 CONFIGURE_ARGS+= --with-tape-server=${AMANDA_SERVER}
69 .if !defined(WITHOUT_GNUTAR)
70 CONFIGURE_ARGS+=--with-gnutar-listdir=${AMANDA_GNUTAR_LISTDIR} \
71 --with-gnutar=${LOCALBASE}/bin/gtar
72 BUILD_DEPENDS+= gtar:${PORTSDIR}/archivers/gtar
73 RUN_DEPENDS+= gtar:${PORTSDIR}/archivers/gtar
77 .if !defined(CLIENT_ONLY)
79 SUB_FILES+= pkg-install pkg-deinstall
80 SUB_LIST+= PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL}
84 @${ECHO} "You may use the following build options:"
86 @${ECHO} " AMANDA_SERVER=server to specify a server name"
87 @${ECHO} " The default is `uname -n`"
88 @${ECHO} " AMANDA_USER=user to specify the default user"
89 @${ECHO} " The default is amanda"
90 @${ECHO} " AMANDA_GROUP=group to specify the default group"
91 @${ECHO} " The default is amanda"
92 @${ECHO} " AMANDA_DATES=path to client amandates file"
95 CONFLICTS= amanda-server-2.5.* amanda-server-2.6.* amanda-server-3.2.*
97 BUILD_DEPENDS+= ${LOCALBASE}/lib/amanda/libamandad-${PORTVERSION}.so:${PORTSDIR}/misc/amanda-client
98 RUN_DEPENDS+= ${LOCALBASE}/lib/amanda/libamandad-${PORTVERSION}.so:${PORTSDIR}/misc/amanda-client
100 CONFIGURE_ARGS+=--without-client
104 MAN7= amanda-changers.7 \
105 amanda-compatibility.7 \
107 amanda-interactivity.7 \
109 MAN8= amaddclient.8 amadmin.8 amaespipe.8 amcheck.8 \
110 amcheckdb.8 amcheckdump.8 \
113 amcrypt.8 amcryptsimple.8 amcrypt-ossl-asym.8 amcrypt-ossl.8 \
115 amdump.8 amfetchdump.8 amflush.8 amgetconf.8 amgpgcrypt.8 \
117 amoverview.8 amreport.8 amrestore.8 amrmtape.8 \
118 amserverconfig.8 amstatus.8 \
119 amtape.8 amtoc.8 amtapetype.8 \
122 OPTIONS+= PLOT "enable ploting, requires X11 libraries" off\
123 SAMBA "enable the use of smbclient" off \
124 S3 "enable Amazon S3 device support" off
126 .if defined (WITH_PLOT)
127 BUILD_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
128 RUN_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
131 CONFIGURE_ARGS+= --with-gnuplot=${LOCALBASE}/bin/gnuplot
133 PLIST_SUB+= PLOT='@comment '
134 CONFIGURE_ARGS+= --without-gnuplot
137 .if defined (WITH_SAMBA)
139 BUILD_DEPENDS+= smbclient:${PORTSDIR}/net/${SAMBA_PORT}
140 RUN_DEPENDS+= smbclient:${PORTSDIR}/net/${SAMBA_PORT}
141 CONFIGURE_ARGS+= --with-smbclient=${LOCALBASE}/bin/smbclient
144 # If configure founds libcurl, automatically enabled it (with plist change).
146 LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
147 CONFIGURE_ARGS+= --enable-s3-device
148 PLIST_SUB+= S3DEVICE=''
150 CONFIGURE_ARGS+= --disable-s3-device
151 PLIST_SUB+= S3DEVICE='@comment '
155 @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
156 @${CAT} ${PKGMESSAGE}
163 @${ECHO} "You may use the following build options:"
165 @${ECHO} " AMANDA_SERVER=server to specify a server name"
166 @${ECHO} " The default is `uname -n`"
167 @${ECHO} " AMANDA_GNUTAR_LISTDIR=dir to specify the directory that"
168 @${ECHO} " the gnutar index files should live in"
169 @${ECHO} " The default is ${PREFIX}/var/amanda/gnutar-lists"
170 @${ECHO} " AMANDA_USER=user to specify the default user"
171 @${ECHO} " The default is amanda"
172 @${ECHO} " AMANDA_GROUP=group to specify the default group"
173 @${ECHO} " The default is amanda"
174 @${ECHO} " AMANDA_DATES=path to client amandates file"
177 CONFLICTS= amanda-client-2.5.* amanda-client-2.6.* amanda-client-3.2.*
178 CONFIGURE_ARGS+=--without-server --with-amandates=${AMANDA_DATES}
179 .if defined(AMANDA_NO_SNAPSHOT_DUMP)
180 CFLAGS= -DFreeBSD_NO_SNAPSHOT_DUMP=t
183 MAN5= amanda-archive-format.5 \
184 amanda-client.conf.5 \
186 MAN7= amanda-applications.7 \
206 ${MKDIR} ${AMANDA_GNUTAR_LISTDIR}
207 ${CHOWN} ${USERS}:${AMANDA_GROUP} ${AMANDA_GNUTAR_LISTDIR}
208 ${TOUCH} ${AMANDA_DATES}
209 ${CHOWN} ${USERS}:${AMANDA_GROUP} ${AMANDA_DATES}
215 # Prefix @WANT_SERVER_TRUE@ for server only files.
216 # Prefix @WANT_CLIENT_TRUE@ for client only files.
217 # For debugging: dbprintf(_("getcmd: %s\n"), line);
219 .include <bsd.port.post.mk>