aboutsummaryrefslogtreecommitdiff
path: root/astro/weather
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-10-16 19:35:52 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-10-16 19:35:52 +0000
commit7dc599b6c5fd904213d2eafbdacc1052bb43e08b (patch)
tree0058fb819cdb64d23ec596b9237f022fa4ad033d /astro/weather
parent60158b6203926e0ac7375dd30b2f010c0af9e4df (diff)
downloadports-7dc599b6c5fd904213d2eafbdacc1052bb43e08b.tar.gz
ports-7dc599b6c5fd904213d2eafbdacc1052bb43e08b.zip
- Add LICENSE_FILE
- Fix packaging with Python 3.5
Notes
Notes: svn path=/head/; revision=399509
Diffstat (limited to 'astro/weather')
-rw-r--r--astro/weather/Makefile11
1 files changed, 9 insertions, 2 deletions
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}/