1 # Created by: Gerhard Häring <gh@ghaering.de>
7 MASTER_SITES= http://launchpad.net/duplicity/0.6-series/${PORTVERSION}/+download/
9 MAINTAINER= jase@FreeBSD.org
10 COMMENT= Backup tool that uses librsync and GnuPG
12 LIB_DEPENDS= librsync.so:${PORTSDIR}/net/librsync
13 RUN_DEPENDS= gpg:${PORTSDIR}/security/gnupg \
14 ${PYTHON_PKGNAMEPREFIX}lockfile>=0:${PORTSDIR}/devel/py-lockfile
17 USE_PYTHON= distutils autoplist
20 OPTIONS_DEFINE= NLS DOCS SSH FTP FTPS S3 GDOCS CLOUDFILES GIO
21 OPTIONS_DEFAULT=SSH FTP FTPS S3
22 CLOUDFILES_DESC=Install CloudFiles backend
23 FTP_DESC= Install FTP backend
24 FTPS_DESC= Install FTPS backend
25 GDOCS_DESC= Install Google Docs backend
26 GIO_DESC= Install GIO backend
27 S3_DESC= Install Amazon S3 backend
28 SSH_DESC= Install SSH/SCP/SFTP backend
30 PORTDOCS= COPYING README README-REPO README-LOG tarfile-LICENSE \
31 tarfile-CHANGES CHANGELOG
34 SSH_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}paramiko>=1.7.7.1:${PORTSDIR}/security/py-paramiko
35 FTP_RUN_DEPENDS= ncftp>=3.2.2:${PORTSDIR}/ftp/ncftp3
36 FTPS_RUN_DEPENDS= lftp>=3.7.15:${PORTSDIR}/ftp/lftp
37 S3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto>=1.6b:${PORTSDIR}/devel/py-boto
38 GDOCS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gdata>0:${PORTSDIR}/devel/py-gdata
39 CLOUDFILES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cloudfiles>0:${PORTSDIR}/net/py-cloudfiles
40 GIO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gobject>0:${PORTSDIR}/devel/py-gobject \
41 dbus>0:${PORTSDIR}/devel/dbus
43 .include <bsd.port.options.mk>
46 .if empty(PORT_OPTIONS:MNLS)
47 @${REINPLACE_CMD} -e '56,67d' \
50 .if empty(PORT_OPTIONS:MSSH)
51 @${FIND} ${WRKSRC}/${PORTNAME}/backends -type f -depth 1 -name '*ssh*' -delete
53 .if empty(PORT_OPTIONS:MFTP)
54 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/ftpbackend.py
56 .if empty(PORT_OPTIONS:MFTPS)
57 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/ftpsbackend.py
59 .if empty(PORT_OPTIONS:MS3)
60 .for f in botobackend _boto_multi _boto_single
61 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/${f}.py
64 .if empty(PORT_OPTIONS:MGDOCS)
65 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/gdocsbackend.py
67 .if empty(PORT_OPTIONS:MCLOUDFILES)
68 .for f in cfbackend _cf_cloudfiles _cf_pyrax
69 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/${f}.py
72 # Make pycloudfiles the default backend for cloudfiles, as pyrax isn't in the Ports Collection yet
73 # Use --cf-backend=pyrax arg when running duplicity to manually select pyrax as the backend
74 @${REINPLACE_CMD} 's|"pyrax"|"cloudfiles"|' ${WRKSRC}/${PORTNAME}/globals.py
76 .if empty(PORT_OPTIONS:MGIO)
77 @${RM} -f ${WRKSRC}/${PORTNAME}/backends/giobackend.py
81 ${MKDIR} ${STAGEDIR}${DOCSDIR}
83 ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
86 .include <bsd.port.mk>