# Created by: Sergei Kolobov <sergei@kolobov.com>
# $FreeBSD: tags/RELEASE_10_0_0/mail/pymsgauth/Makefile 327742 2013-09-20 19:59:12Z bapt $

PORTNAME=	pymsgauth
PORTVERSION=	2.1.0
CATEGORIES=	mail python
MASTER_SITES=	http://pyropus.ca/software/pymsgauth/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Automatically process qsecretary confirmation requests

USE_PYTHON=	yes

SUB_FILES=	pkg-message

DOCS=		BUGS CHANGELOG pymsgauth.txt pymsgauth.html
EXAMPLES=	pymsgauthrc-example

NO_STAGE=	yes
do-build:
	${REINPLACE_CMD} -e 's,#!/usr/bin/python,#!/usr/bin/env python,' \
	 	${WRKSRC}/pymsgauth-*
	${RM} ${WRKSRC}/pymsgauth-*.bak

do-install:
	@${MKDIR} ${DATADIR}
	${INSTALL_SCRIPT} ${WRKSRC}/*.py ${WRKSRC}/pymsgauth-* ${DATADIR}
	${LN} -sf ${DATADIR}/pymsgauth-* ${PREFIX}/bin
	@${MKDIR} ${EXAMPLESDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
