freebsd-ports/net/pygopherd/Makefile
Clement Laforet 0c64c72c56 - update pygopherd to 2.0.3
- preserve config file

PR:             59984
Approved by:    erwin (mentor)
2003-12-18 14:36:28 +00:00

40 lines
1.1 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: pygopherd
# Date created: Sep 6, 2002
# Whom: ijliao
#
# $FreeBSD$
#
PORTNAME= pygopherd
PORTVERSION= 2.0.3
CATEGORIES= net python
MASTER_SITES= http://gopher.quux.org:70/devel/gopher/Downloads/pygopherd/
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Multiprotocol Information Server
USE_PYTHON= yes
USE_PYDISTUTILS= yes
USE_REINPLACE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
MAN8= pygopherd.8
post-patch:
.for file in setup.py bin/pygopherd conf/pygopherd.conf pygopherd.8
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${file}
.endfor
@${REINPLACE_CMD} -e "s|/usr/bin/python2.2|${SETENV} python|g" \
${WRKSRC}/bin/pygopherd
@${FIND} ${WRKSRC} -name "*.py" | ${XARGS} ${REINPLACE_CMD} \
-e "s|/usr/bin/python2.2|${SETENV} python|g"
@${MV} ${WRKSRC}/conf/pygopherd.conf ${WRKSRC}/conf/pygopherd.conf-dist
post-install:
@${INSTALL_MAN} ${WRKSRC}/${MAN8} ${MANPREFIX}/man/man8
@[ -f ${PREFIX}/etc/pygopherd/pygopherd.conf ] || \
${CP} ${PREFIX}/etc/pygopherd/pygopherd.conf-dist ${PREFIX}/etc/pygopherd/pygopherd.conf
.include <bsd.port.mk>