freebsd-ports/finance/openerp/Makefile
Beech Rintoul ce5d2946b1 - Update To 6.0.3
PR:		ports/160310
Submitted by:	Laurent Berthelet <laurent@ospowa.com> (maintainer)
2011-09-06 23:08:36 +00:00

99 lines
4.3 KiB
Makefile

# New ports collection makefile for: openerp-server
# Date created: 27 February 2009
# Whom: Wen Heping <wenheping@gmail.com>
#
# $FreeBSD$
#
PORTNAME= openerp-server
PORTVERSION= 6.0.3
PORTEPOCH= 1
CATEGORIES= finance python
MASTER_SITES= http://www.openerp.com/download/stable/source/
MAINTAINER= laurent@ospowa.com
COMMENT= Open source application ERP & CRM in Python using Postgresql
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2 \
${PYTHON_PKGNAMEPREFIX}pytz>0:${PORTSDIR}/devel/py-pytz \
${PYTHON_SITELIBDIR}/mx/__init__.py:${PORTSDIR}/lang/py-mx-base \
${PYTHON_PKGNAMEPREFIX}psycopg2>0:${PORTSDIR}/databases/py-psycopg2 \
${PYTHON_PKGNAMEPREFIX}chart>0:${PORTSDIR}/graphics/py-chart \
${PYTHON_PKGNAMEPREFIX}pydot>0:${PORTSDIR}/graphics/py-pydot \
${PYTHON_PKGNAMEPREFIX}libxslt>0:${PORTSDIR}/textproc/py-libxslt \
${PYTHON_PKGNAMEPREFIX}lxml>0:${PORTSDIR}/devel/py-lxml \
${PYTHON_PKGNAMEPREFIX}xml>0:${PORTSDIR}/textproc/py-xml \
${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \
${PYTHON_PKGNAMEPREFIX}mako>0:${PORTSDIR}/textproc/py-mako \
${PYTHON_PKGNAMEPREFIX}dateutil>0:${PORTSDIR}/devel/py-dateutil \
${PYTHON_SITELIBDIR}/reportlab/__init__.py:${PORTSDIR}/print/py-reportlab2
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2 \
${PYTHON_PKGNAMEPREFIX}pytz>0:${PORTSDIR}/devel/py-pytz \
${PYTHON_SITELIBDIR}/mx/__init__.py:${PORTSDIR}/lang/py-mx-base \
${PYTHON_PKGNAMEPREFIX}psycopg2>0:${PORTSDIR}/databases/py-psycopg2 \
${PYTHON_PKGNAMEPREFIX}chart>0:${PORTSDIR}/graphics/py-chart \
${PYTHON_PKGNAMEPREFIX}pydot>0:${PORTSDIR}/graphics/py-pydot \
${PYTHON_PKGNAMEPREFIX}libxslt>0:${PORTSDIR}/textproc/py-libxslt \
${PYTHON_PKGNAMEPREFIX}lxml>0:${PORTSDIR}/devel/py-lxml \
${PYTHON_PKGNAMEPREFIX}xml>0:${PORTSDIR}/textproc/py-xml \
${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \
${PYTHON_PKGNAMEPREFIX}mako>0:${PORTSDIR}/textproc/py-mako \
${PYTHON_PKGNAMEPREFIX}dateutil>0:${PORTSDIR}/devel/py-dateutil \
${PYTHON_SITELIBDIR}/reportlab/__init__.py:${PORTSDIR}/print/py-reportlab2
USE_RC_SUBR= openerpd
SUB_FILES= openerp-server.conf pkg-message
SUB_LIST= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
USE_PYTHON= 2.5+
USE_PYDISTUTILS= yes
PYDISTUTILS_EGGINFODIR= ${PYTHON_SITELIBDIR}/openerp_server-${PORTVERSION}-${PYTHON_VERSION:S/thon//}.egg-info
PYDISTUTILS_EGGINFO= PKG-INFO
USERS= openerpd
GROUPS= openerpd
MAN1= openerp-server.1
MAN5= openerp_serverrc.5
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|g' ${WRKSRC}/bin/openerp-server.py
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
@${FIND} -s -d ${DOCSDIR} -type f | ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
@${FIND} -s -d ${DOCSDIR} -type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
.endif
${INSTALL_MAN} ${WRKSRC}/man/openerp-server.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/openerp_serverrc.5 ${PREFIX}/man/man5
${INSTALL_DATA} ${WRKDIR}/openerp-server.conf ${PREFIX}/etc/openerp-server.conf.sample
@if [ ! -f ${PREFIX}/etc/openerp-server.conf ]; then \
${CP} -p ${PREFIX}/etc/openerp-server.conf.sample ${PREFIX}/etc/openerp-server.conf ; \
fi
@${ECHO} '@unexec if cmp -s %D/etc/openerp-server.conf.sample %D/etc/openerp-server.conf; then rm -f %D/etc/openerp-server.conf; fi' >> ${TMPPLIST}
@${ECHO} etc/openerp-server.conf.sample >> ${TMPPLIST}
@${ECHO} '@exec if [ ! -f %D/etc/openerp-server.conf ]; then cp -p %D/%F %B/openerp-server.conf; fi' >> ${TMPPLIST}
@${CHMOD} a+x ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/openerp-server.py
@${ECHO} bin/openerp-server >> ${TMPPLIST}
@${FIND} -s -d ${PYTHON_SITELIBDIR}/${PORTNAME} \
-type f | ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
@${FIND} -s -d ${PYTHON_SITELIBDIR}/${PORTNAME} \
-type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
@${FIND} -s -d ${PYDISTUTILS_EGGINFODIR} \
-type f -print |grep -v PKG-INFO| ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
@${FIND} -s -d ${PYDISTUTILS_EGGINFODIR} \
-type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>