1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Install data files (airports, places, stations, zctas and zones)

- Use CONFLICTS_INSTALL instead of CONFLICTS
- Use USES=shebangfix
- Add post-install: message
- Bump PORTREVISION for package change

PR:		ports/181955
Submitted by:	hiren
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2013-09-09 10:09:03 +00:00
parent 32cb91cb62
commit bb696ca443
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=326797

View File

@ -3,6 +3,7 @@
PORTNAME= weather
PORTVERSION= 2.0
PORTREVISION= 1
CATEGORIES= astro python
MASTER_SITES= http://fungi.yuggoth.org/weather/src/ \
LOCAL/sunpoet
@ -12,10 +13,11 @@ COMMENT= Utility to provide current weather conditions and forecasts
LICENSE= ISCL
CONFLICTS= expect-[0-9]* expect-nox11-[0-9]*
CONFLICTS_INSTALL= expect-[0-9]* expect-nox11-[0-9]*
USE_PYTHON= yes
USE_XZ= yes
USES= shebangfix
MAN1= ${PORTNAME}.1
MAN5= ${PORTNAME}rc.5
@ -23,9 +25,11 @@ PLIST_FILES= bin/${PORTNAME} \
%%PYTHON_SITELIBDIR%%/${PORTNAME}.py \
%%PYTHON_SITELIBDIR%%/${PORTNAME}.pyc \
%%PYTHON_SITELIBDIR%%/${PORTNAME}.pyo
PORTDATA= airports places stations zctas zones
post-patch:
@${REINPLACE_CMD} -e '1 s|/usr/bin/env python|${PYTHON_CMD}|' ${WRKSRC}/${PORTNAME}
SHEBANG_FILES= ${PORTNAME}
python_OLD_CMD= ${SETENV} python
python_CMD= ${PYTHON_CMD}
do-build:
@${PYTHON_CMD} -m compileall ${WRKSRC}/${PORTNAME}.py
@ -36,5 +40,15 @@ do-install:
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTNAME}.py ${PORTNAME}.pyc ${PORTNAME}.pyo ${PYTHON_SITELIBDIR}/
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1/${PORTNAME}.1
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}rc.5 ${MANPREFIX}/man/man5/${PORTNAME}rc.5
${MKDIR} ${DATADIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDATA} ${DATADIR}/
post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} "Please add the following to your .weatherrc in order to use installed data files:"
@${ECHO_MSG} ""
@${ECHO_MSG} "[default]"
@${ECHO_MSG} "setpath = ${DATADIR}"
@${ECHO_MSG} ""
.include <bsd.port.mk>