aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-06-01 02:26:30 +0800
committeradamw <adamw@FreeBSD.org>2014-06-01 02:26:30 +0800
commitb658ee065b4723aaa6926e5e6dc32a6ab7e44175 (patch)
tree29df7fa4e7a64cb5603ccd52ff690d4d6bc124e0
parent6be45f9f5be2834f985ca2eafc1f7f07b878f7da (diff)
downloadfreebsd-ports-gnome-b658ee065b4723aaa6926e5e6dc32a6ab7e44175.tar.gz
freebsd-ports-gnome-b658ee065b4723aaa6926e5e6dc32a6ab7e44175.tar.zst
freebsd-ports-gnome-b658ee065b4723aaa6926e5e6dc32a6ab7e44175.zip
Add a DOCS option to allow control of installing PORTDOCS. The
autoplist stuff sure makes this difficult!
-rw-r--r--mail/pyzor/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/mail/pyzor/Makefile b/mail/pyzor/Makefile
index 1275cb7e1cc0..94ea56091a68 100644
--- a/mail/pyzor/Makefile
+++ b/mail/pyzor/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pyzor
PORTVERSION= 0.5.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= mail python
MASTER_SITES= SF
@@ -12,7 +12,7 @@ COMMENT= Collaborative, networked system to detect and block spam
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gdbm>=0:${PORTSDIR}/databases/py-gdbm
-USE_BZIP2= yes
+USES= tar:bzip2
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
@@ -20,15 +20,25 @@ PYDISTUTILS_AUTOPLIST= yes
PLIST_FILES= man/man1/pyzor.1.gz \
man/man1/pyzord.1.gz
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
post-patch:
${REINPLACE_CMD} -e '1s,^#!/usr/bin/python,#!/usr/bin/env -S python -Wignore::DeprecationWarning,' \
${WRKSRC}/scripts/pyzor ${WRKSRC}/scripts/pyzord
+.if ${PORT_OPTIONS:MDOCS}
${REINPLACE_CMD} -e 's|share/doc/pyzor|${DOCSDIR}|' ${WRKSRC}/setup.py
+.else
+ ${REINPLACE_CMD} -e '/usage.html/d' ${WRKSRC}/setup.py
+.endif
post-install:
- ${CHMOD} ${SHAREMODE} ${STAGEDIR}${DOCSDIR}/usage.html
${CHMOD} ${BINMODE} ${STAGEDIR}${PREFIX}/bin/pyzor ${STAGEDIR}${PREFIX}/bin/pyzord
${INSTALL_MAN} ${WRKSRC}/docs/pyzor.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/docs/pyzord.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+.if ${PORT_OPTIONS:MDOCS}
+ ${CHMOD} ${SHAREMODE} ${STAGEDIR}${DOCSDIR}/usage.html
+.endif
.include <bsd.port.mk>