2009-12-31 11:53:33 +00:00
|
|
|
# New ports collection makefile for: pootle
|
|
|
|
# Date created: 14 Dec 2009
|
|
|
|
# Whom: Denis Pokataev <catone@cpan.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= pootle
|
2011-04-15 06:49:42 +00:00
|
|
|
PORTVERSION= 2.1.6
|
2012-07-12 12:14:52 +00:00
|
|
|
PORTREVISION= 2
|
2009-12-31 11:53:33 +00:00
|
|
|
CATEGORIES= textproc
|
|
|
|
MASTER_SITES= SF/translate/Pootle/${PORTVERSION}/
|
|
|
|
DISTNAME= Pootle-${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= catone@cpan.org
|
|
|
|
COMMENT= Pootle is a user-friendly web portal for simple translation process
|
|
|
|
|
2010-09-29 13:46:42 +00:00
|
|
|
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django>=1.2:${PORTSDIR}/www/py-django \
|
2010-11-23 19:30:30 +00:00
|
|
|
translate-toolkit>=1.8.1:${PORTSDIR}/textproc/translate-toolkit \
|
2010-09-29 13:46:42 +00:00
|
|
|
${PYTHON_PKGNAMEPREFIX}south>=0.7:${PORTSDIR}/databases/py-south
|
2009-12-31 11:53:33 +00:00
|
|
|
|
|
|
|
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
CONFLICTS= ${PYTHON_PKGNAMEPREFIX}django-profiles-[0-9]* \
|
|
|
|
${PYTHON_PKGNAMEPREFIX}django-registration-[0-9]*
|
|
|
|
|
2009-12-31 11:53:33 +00:00
|
|
|
USE_BZIP2= yes
|
2013-04-24 18:10:30 +00:00
|
|
|
USES= gettext
|
2009-12-31 11:53:33 +00:00
|
|
|
USE_PYTHON= yes
|
|
|
|
USE_PYDISTUTILS=yes
|
|
|
|
PYDISTUTILS_PKGNAME= Pootle
|
|
|
|
|
2010-06-28 17:43:08 +00:00
|
|
|
POOTLEUSER?= nobody
|
|
|
|
POOTLEGROUP?= nobody
|
|
|
|
|
|
|
|
POOTLEDBDIR?= /var/db/pootle
|
|
|
|
POOTLELOGDIR?= /var/log/pootle
|
|
|
|
POOTLERUNDIR?= /var/run/pootle
|
|
|
|
|
2012-08-05 23:19:36 +00:00
|
|
|
USE_RC_SUBR= pootle
|
2010-06-28 17:43:08 +00:00
|
|
|
SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" \
|
|
|
|
POOTLEDBDIR="${POOTLEDBDIR}" \
|
|
|
|
POOTLELOGDIR="${POOTLELOGDIR}" \
|
|
|
|
POOTLERUNDIR="${POOTLERUNDIR}" \
|
|
|
|
POOTLEUSER="${POOTLEUSER}" \
|
|
|
|
POOTLEGROUP="${POOTLEGROUP}" \
|
|
|
|
CHOWN="${CHOWN}" \
|
|
|
|
CHMOD="${CHMOD}" \
|
|
|
|
MKDIR="${MKDIR}"
|
|
|
|
|
|
|
|
PLIST_SUB+= POOTLEDBDIR="${POOTLEDBDIR}" \
|
|
|
|
POOTLELOGDIR="${POOTLELOGDIR}"
|
|
|
|
|
|
|
|
SUB_FILES+= pkg-install
|
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
2009-12-31 11:53:33 +00:00
|
|
|
|
2010-04-05 22:59:33 +00:00
|
|
|
PORTDOCS= ChangeLog COPYING INSTALL README wsgi.py
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
OPTIONS_DEFINE= MYSQL SUBVERSION LUCENE MEMCACHED
|
|
|
|
OPTIONS_DEFAULT= MYSQL SUBVERSION LUCENE MEMCACHED
|
|
|
|
SUBVERSION_DESC= ${SVN_DESC}
|
|
|
|
LUCENE_DESC= py-lucene for faster searching
|
|
|
|
MEMCACHED_DESC= Enable memcached support
|
2010-09-15 19:28:20 +00:00
|
|
|
|
2010-06-28 17:43:08 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2010-09-15 19:28:20 +00:00
|
|
|
USE_MYSQL= yes
|
|
|
|
.endif
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
.if ${PORT_OPTIONS:MSUBVERSION}
|
2010-09-15 19:28:20 +00:00
|
|
|
RUN_DEPENDS+= svn:${PORTSDIR}/devel/subversion
|
|
|
|
.endif
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
.if ${PORT_OPTIONS:MLUCENE}
|
2010-10-03 08:33:48 +00:00
|
|
|
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}PyLucene>0:${PORTSDIR}/textproc/py-lucene
|
2010-09-15 19:28:20 +00:00
|
|
|
.endif
|
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
.if ${PORT_OPTIONS:MMEMCACHED}
|
2010-09-15 19:28:20 +00:00
|
|
|
LIB_DEPENDS+= memcached:${PORTSDIR}/databases/libmemcached
|
2010-09-29 13:46:42 +00:00
|
|
|
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}memcached>=1.45:${PORTSDIR}/databases/py-memcached
|
2010-09-15 19:28:20 +00:00
|
|
|
.endif
|
|
|
|
|
2009-12-31 11:53:33 +00:00
|
|
|
post-patch:
|
|
|
|
@${MV} ${WRKSRC}/localsettings.py ${WRKSRC}/localsettings.py.sample
|
2010-06-28 17:43:08 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|^CONFIG_DIR.*=.*|CONFIG_DIR = \'${PREFIX}/etc/pootle\'|g" \
|
|
|
|
-e "s|^DATA_DIR.*=.*|DATA_DIR = \\'${DATADIR}\\'|g" \
|
|
|
|
-e "s|^WORKING_DIR.*=.*|WORKING_DIR = \\'${POOTLEDBDIR}\\'|g" \
|
|
|
|
${WRKSRC}/pootle/install_dirs.py
|
|
|
|
@${REINPLACE_CMD} -e "s|^INSTALL_CONFIG_DIR.*=.*|INSTALL_CONFIG_DIR = \'${PREFIX}/etc/pootle\'|g" \
|
|
|
|
-e "s|^INSTALL_WORKING_DIR.*=.*|INSTALL_WORKING_DIR = \'${POOTLEDBDIR}\'|g" \
|
|
|
|
${WRKSRC}/setup.py
|
2009-12-31 11:53:33 +00:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2010-06-28 17:43:08 +00:00
|
|
|
@${CP} -n ${PREFIX}/etc/pootle/localsettings.py.sample \
|
2013-05-04 22:48:03 +00:00
|
|
|
${PREFIX}/etc/pootle/localsettings.py || ${TRUE}
|
2009-12-31 11:53:33 +00:00
|
|
|
|
2012-07-12 12:14:52 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2010-04-05 22:59:33 +00:00
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
.for docs in ${PORTDOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2010-06-28 17:43:08 +00:00
|
|
|
.include <bsd.port.post.mk>
|