freebsd-ports/ftp/py-pyftpdlib/Makefile
Li-Wen Hsu 74ca516d44 - Tweak USE_PYTHON to -2.7 to match upstream compatibility
- Switch from distutils to easy_install (update pkg_plist to suit)
- Add OptionsNG for SENDFILE and OPENSSL support
- Add test: target to run unit tests
- Patch: setup.py
  - Add zip_safe=False to install egg uncompressed
  - Add test_suite for running unit tests via setup.py
- Patch: test/test_*
  - add path hacks to test WRKSRC sources

PR:		ports/171682
Submitted by:	Kubilay Kocak <koobs.freebsd@gmail.com>
2012-09-22 14:04:11 +00:00

53 lines
1.2 KiB
Makefile

# New ports collection makefile for: py-pyftpdlib
# Date created: Mar. 06, 2007
# Whom: Li-Wen Hsu <lwhsu@lwhsu.org>
#
# $FreeBSD$
#
PORTNAME= pyftpdlib
PORTVERSION= 0.7.0
PORTREVISION= 1
CATEGORIES= ftp python
MASTER_SITES= GOOGLE_CODE
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= lwhsu@FreeBSD.org
COMMENT= Python FTP server library
LICENSE= MIT
USE_PYTHON= -2.7
USE_PYDISTUTILS= easy_install
OPTIONS_DEFINE= SENDFILE OPENSSL
OPTIONS_DEFAULT= SENDFILE OPENSSL
SENDFILE_DESC= Enable sendfile(2) support
OPENSSL_DESC= Enable FTP over SSL/TLS (RFC4217)
# Workaround ports infrastructure bug
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSENDFILE}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pysendfile>0:${PORTSDIR}/net/py-pysendfile
.endif
.if ${PORT_OPTIONS:MOPENSSL}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}openssl>0:${PORTSDIR}/security/py-openssl
.endif
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
post-install:
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
${CP} -R ${WRKSRC}/demo/ ${EXAMPLESDIR}
.endif
test: build
${TOUCH} ${WRKSRC}/test/__init__.py
cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
.include <bsd.port.mk>