freebsd-ports/astro/py-metar/Makefile
2013-04-27 04:49:25 +00:00

51 lines
1.4 KiB
Makefile

# Created by: Hye-Shik Chang <perky@fallin.lv>
# $FreeBSD$
PORTNAME= metar
PORTVERSION= 0.19
CATEGORIES= astro python geography
MASTER_SITES= http://www.schwarzvogel.de/pkgs/ \
LOCAL/sunpoet
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${REALPORTNAME}-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Python module that provides access to NOAA METAR weather reports
LICENSE= GPLv2
OPTIONS_DEFINE= DOCS
OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}/options
PYDISTUTILS_PKGNAME= ${REALPORTNAME}
USE_PYDISTUTILS=yes
USE_PYTHON= -2.7
DOCSDIR= ${PREFIX}/share/doc/${REALPORTNAME}-${PORTVERSION}
MAN1= ${REALPORTNAME}.1
MANCOMPRESSED= no
PLIST_FILES= bin/${REALPORTNAME} \
%%PYTHON_SITELIBDIR%%/${REALPORTNAME}.py \
%%PYTHON_SITELIBDIR%%/${REALPORTNAME}.pyc \
%%PYTHON_SITELIBDIR%%/${REALPORTNAME}.pyo
PORTDOCS= COPYING README THANKS librarydoc.txt
REALPORTNAME= pymetar
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -E '1 s|/usr/bin/(env *)?python|${PYTHON_CMD}|' \
${WRKSRC}/${PYSETUP} ${WRKSRC}/bin/${REALPORTNAME}
@${REINPLACE_CMD} -e 's|share/\(man/man1\)|\1|' ${WRKSRC}/${PYSETUP}
.if ${PORT_OPTIONS:MDOCS}
@${REINPLACE_CMD} \
-e 's|"share/doc/pymetar-%s/"%pymetar.__version__|"${DOCSDIR}"|' \
${WRKSRC}/${PYSETUP}
.else
@${REINPLACE_CMD} \
-e 's|"share/doc/pymetar-%s/"%pymetar.__version__|""|' \
-e "s|\['README.*'\]|[]|" ${WRKSRC}/${PYSETUP}
.endif
.include <bsd.port.mk>