From 784a5105f17a1bc4883285dcca6572c3cc0b066d Mon Sep 17 00:00:00 2001 From: sunpoet Date: Fri, 16 Oct 2015 19:35:52 +0000 Subject: - Add LICENSE_FILE - Fix packaging with Python 3.5 --- astro/weather/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'astro/weather') diff --git a/astro/weather/Makefile b/astro/weather/Makefile index 5cb1a0c82442..27d895e0098f 100644 --- a/astro/weather/Makefile +++ b/astro/weather/Makefile @@ -12,13 +12,14 @@ MAINTAINER= sunpoet@FreeBSD.org COMMENT= Utility to provide current weather conditions and forecasts LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE USES= python shebangfix tar:xz PLIST_FILES= bin/${PORTNAME} \ %%PYTHON_SITELIBDIR%%/${PORTNAME}.py \ %%PYTHON_SITELIBDIR%%/${PYCACHE_DIR}${PYCACHE_FILE}.pyc \ - %%PYTHON_SITELIBDIR%%/${PYCACHE_DIR}${PYCACHE_FILE}.pyo \ + %%PYTHON_SITELIBDIR%%/${PYCACHE_DIR}${PYCACHE_FILE}.${PYOEXTENSION} \ man/man1/${PORTNAME}.1.gz \ man/man5/${PORTNAME}rc.5.gz PORTDATA= airports places stations zctas zones @@ -36,6 +37,12 @@ PYCACHE_DIR= __pycache__/ PYCACHE_FILE= ${PORTNAME}.cpython-${PYTHON_SUFFIX} .endif +.if ${PYTHON_REL} < 3500 +PYOEXTENSION= pyo +.else +PYOEXTENSION= opt-1.pyc +.endif + do-build: @${PYTHON_CMD} -m compileall ${WRKSRC}/${PORTNAME}.py @${PYTHON_CMD} -O -m compileall ${WRKSRC}/${PORTNAME}.py @@ -45,7 +52,7 @@ do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${PYTHON_SITELIBDIR}/ ${INSTALL_DATA} ${WRKSRC}/${PYCACHE_DIR}${PYCACHE_FILE}.pyc ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} - ${INSTALL_DATA} ${WRKSRC}/${PYCACHE_DIR}${PYCACHE_FILE}.pyo ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} + ${INSTALL_DATA} ${WRKSRC}/${PYCACHE_DIR}${PYCACHE_FILE}.${PYOEXTENSION} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1/${PORTNAME}.1 ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}rc.5 ${STAGEDIR}${MANPREFIX}/man/man5/${PORTNAME}rc.5 ${MKDIR} ${STAGEDIR}${DATADIR}/ -- cgit