Prune sysutils/pcpustat
[dports.git] / sysutils / duplicity / Makefile
1 # Created by: Gerhard Häring <gh@ghaering.de>
2 # $FreeBSD$
3
4 PORTNAME=       duplicity
5 PORTVERSION=    0.6.25
6 CATEGORIES=     sysutils
7 MASTER_SITES=   http://launchpad.net/duplicity/0.6-series/${PORTVERSION}/+download/
8
9 MAINTAINER=     jase@FreeBSD.org
10 COMMENT=        Backup tool that uses librsync and GnuPG
11
12 LIB_DEPENDS=    librsync.so:${PORTSDIR}/net/librsync
13 RUN_DEPENDS=    gpg:${PORTSDIR}/security/gnupg \
14                                 ${PYTHON_PKGNAMEPREFIX}lockfile>=0:${PORTSDIR}/devel/py-lockfile
15
16 USES=           python:2
17 USE_PYTHON=     distutils autoplist
18 USE_LDCONFIG=   yes
19
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
29
30 PORTDOCS=       COPYING README README-REPO README-LOG tarfile-LICENSE \
31                         tarfile-CHANGES CHANGELOG
32
33 NLS_USES=                       gettext
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
42
43 .include <bsd.port.options.mk>
44
45 post-patch:
46 .if empty(PORT_OPTIONS:MNLS)
47         @${REINPLACE_CMD} -e '56,67d' \
48                 ${WRKSRC}/setup.py
49 .endif
50 .if empty(PORT_OPTIONS:MSSH)
51         @${FIND} ${WRKSRC}/${PORTNAME}/backends -type f -depth 1 -name '*ssh*' -delete
52 .endif
53 .if empty(PORT_OPTIONS:MFTP)
54         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/ftpbackend.py
55 .endif
56 .if empty(PORT_OPTIONS:MFTPS)
57         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/ftpsbackend.py
58 .endif
59 .if empty(PORT_OPTIONS:MS3)
60 .for f in botobackend _boto_multi _boto_single
61         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/${f}.py
62 .endfor
63 .endif
64 .if empty(PORT_OPTIONS:MGDOCS)
65         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/gdocsbackend.py
66 .endif
67 .if empty(PORT_OPTIONS:MCLOUDFILES)
68 .for f in cfbackend _cf_cloudfiles _cf_pyrax
69         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/${f}.py
70 .endfor
71 .else
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
75 .endif
76 .if empty(PORT_OPTIONS:MGIO)
77         @${RM} -f ${WRKSRC}/${PORTNAME}/backends/giobackend.py
78 .endif
79
80 post-install:
81         ${MKDIR} ${STAGEDIR}${DOCSDIR}
82 .for f in ${PORTDOCS}
83         ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
84 .endfor
85
86 .include <bsd.port.mk>