1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

Add pootle 2.0.0, pootle is a user-friendly web portal for simple

translation process.
This commit is contained in:
Sergey Skvortsov 2009-12-31 11:53:33 +00:00
parent fe41a50fa0
commit 6b89683496
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246933
9 changed files with 1439 additions and 0 deletions

View File

@ -914,6 +914,7 @@
SUBDIR += php5-xsl
SUBDIR += po4a
SUBDIR += pocketreader
SUBDIR += pootle
SUBDIR += popup
SUBDIR += popup-stacks
SUBDIR += ppower4

40
textproc/pootle/Makefile Normal file
View File

@ -0,0 +1,40 @@
# New ports collection makefile for: pootle
# Date created: 14 Dec 2009
# Whom: Denis Pokataev <catone@cpan.org>
#
# $FreeBSD$
#
PORTNAME= pootle
PORTVERSION= 2.0.0
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
BUILD_DEPENDS= py*-django>=1.1:${PORTSDIR}/www/py-django \
translate-toolkit>=1.5.1:${PORTSDIR}/textproc/translate-toolkit
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_BZIP2= yes
USE_GETTEXT= yes
USE_PYTHON= yes
USE_PYDISTUTILS=yes
PYDISTUTILS_PKGNAME= Pootle
USE_RC_SUBR= pootle.sh
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
post-patch:
@${MV} ${WRKSRC}/localsettings.py ${WRKSRC}/localsettings.py.sample
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.if !exists("${PREFIX}/etc/pootle/localsettings.py")
@${CP} ${PREFIX}/etc/pootle/localsettings.py.sample ${PREFIX}/etc/pootle/localsettings.py
.endif
.include <bsd.port.mk>

3
textproc/pootle/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (Pootle-2.0.0.tar.bz2) = 5f7e9a8a08352cb9fd4acb0b943e4328
SHA256 (Pootle-2.0.0.tar.bz2) = 96f5d1a89356dffd2a290f866d8f82766b22d1cb7eec710888024202ac8d57b0
SIZE (Pootle-2.0.0.tar.bz2) = 1718095

View File

@ -0,0 +1,15 @@
--- pootle/install_dirs.py 2009-09-03 05:52:41.000000000 +0400
+++ pootle/install_dirs.py 2009-12-16 19:49:09.000000000 +0300
@@ -1,9 +1,9 @@
import os
-CONFIG_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
-DATA_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+CONFIG_DIR = '/usr/local/etc/pootle'
+DATA_DIR = '/usr/local/share/pootle'
SOURCE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
-WORKING_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+WORKING_DIR = '/var/db/pootle'
def config_path(filename):
return os.path.join(CONFIG_DIR, filename)

View File

@ -0,0 +1,24 @@
--- setup.py 2009-12-17 13:56:51.000000000 +0300
+++ setup.py 2009-12-17 13:57:06.000000000 +0300
@@ -54,10 +54,10 @@
It uses the Translate Toolkit to get access to translation files and therefore
can edit a variety of files (including PO and XLIFF files)."""
-INSTALL_CONFIG_DIR = '/etc/pootle'
+INSTALL_CONFIG_DIR = 'etc/pootle'
INSTALL_DATA_DIR = 'share/pootle'
INSTALL_DOC_DIR = 'share/doc/pootle'
-INSTALL_WORKING_DIR = '/var/lib/pootle'
+INSTALL_WORKING_DIR = '/var/db/pootle'
###############################################################################
# HELPER FUNCTIONS
@@ -65,7 +65,7 @@
def collect_options():
data_files = [
- (INSTALL_CONFIG_DIR, ['localsettings.py']),
+ (INSTALL_CONFIG_DIR, ['localsettings.py.sample']),
(INSTALL_DOC_DIR, ['wsgi.py', 'ChangeLog', 'COPYING', 'README', 'INSTALL']),
(INSTALL_WORKING_DIR + '/dbs', []) # Create the empty "dbs" dir
] + list_tree(INSTALL_DATA_DIR, 'templates') + list_tree(INSTALL_DATA_DIR, 'html') + \

View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: pootle
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf to run pootle:
#
# pootle_enable (bool): Set it to "YES" to enable pootle.
# Default is "NO".
# pootle_flags (flags): Set extra flags here. More options in pootle(1)
# Default is empty "".
# pootle_user (user): Set user to run pootle.
# Default is "nobody".
#
. %%RC_SUBR%%
name=pootle
rcvar=${name}_enable
pidfile="/var/run/pootle.pid"
command_interpreter="%%PYTHON_CMD%%"
required_files="%%PREFIX%%/etc/pootle/localsettings.py"
command="%%PREFIX%%/bin/PootleServer"
pootle_flags=" >>/var/log/pootle/access.log 2>>/var/log/pootle/error.log"
load_rc_config $name
: ${pootle_enable="NO"}
: ${pootle_user="nobody"}
start_cmd="/usr/sbin/daemon -p ${pidfile} -u ${pootle_user} ${command} ${pootle_flags}"
start_precmd="touch ${pidfile}; chown ${pootle_user} ${pidfile}"
run_rc_command "$1"

View File

@ -0,0 +1,8 @@
Pootle is a user-friendly web portal that makes
the translation process so much simpler.
It allows online translation, work assignment,
gives statistics and allows easy volunteer contribution.
You can run Pootle as an Internet server like
these projects or run your own copy on an Intranet.
WWW: http://pootle.locamotion.org/

View File

@ -0,0 +1,22 @@
#! /bin/sh
# $FreeBSD#
PATH=/bin:/usr/bin:/usr/sbin
case $2 in
POST-INSTALL)
DIR=/var/log/pootle
echo "===> Creating directory ${DIR}"
mkdir -p ${DIR}
echo "===> Changing ownership of ${DIR}"
chown -R nobody:nobody ${DIR}
echo "===> Changing permissions of ${DIR}"
chmod -R 770 ${DIR}
DIR=/var/db/pootle
echo "===> Changing ownership of ${DIR}"
chown -R nobody:nobody ${DIR}
echo "===> Changing permissions of ${DIR}"
chmod -R 770 ${DIR}
;;
esac

1288
textproc/pootle/pkg-plist Normal file

File diff suppressed because it is too large Load Diff