aboutsummaryrefslogtreecommitdiffstats
path: root/astro/weather
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2015-10-17 03:35:52 +0800
committersunpoet <sunpoet@FreeBSD.org>2015-10-17 03:35:52 +0800
commit784a5105f17a1bc4883285dcca6572c3cc0b066d (patch)
tree0058fb819cdb64d23ec596b9237f022fa4ad033d /astro/weather
parent34ab62561888bc907b4e15bb60dad474d38ed39c (diff)
downloadfreebsd-ports-gnome-784a5105f17a1bc4883285dcca6572c3cc0b066d.tar.gz
freebsd-ports-gnome-784a5105f17a1bc4883285dcca6572c3cc0b066d.tar.zst
freebsd-ports-gnome-784a5105f17a1bc4883285dcca6572c3cc0b066d.zip
- Add LICENSE_FILE
- Fix packaging with Python 3.5
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}/