packages: pootle/apache.conf (NEW), pootle/pootle-settings.patch (NEW), poo...

glen glen at pld-linux.org
Mon May 10 18:52:38 CEST 2010


Author: glen                         Date: Mon May 10 16:52:38 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new, based on fc, seems starting up

---- Files affected:
packages/pootle:
   apache.conf (NONE -> 1.1)  (NEW), pootle-settings.patch (NONE -> 1.1)  (NEW), pootle.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/pootle/apache.conf
diff -u /dev/null packages/pootle/apache.conf:1.1
--- /dev/null	Mon May 10 18:52:38 2010
+++ packages/pootle/apache.conf	Mon May 10 18:52:32 2010
@@ -0,0 +1,26 @@
+WSGIScriptAlias /pootle /usr/share/pootle/wsgi.py
+<Directory /usr/share/pootle>
+    Order deny,allow
+    Allow from all
+</Directory>
+
+Alias /pootle/html /usr/share/pootle/html
+<Directory /usr/share/pootle/html>
+    Order deny,allow
+    Allow from all
+</Directory>
+
+Alias /pootle/export /var/lib/pootle/po
+<Directory "/var/lib/pootle/po">
+    Order deny,allow
+    Allow from all
+</Directory>
+
+<IfModule mod_deflate.c>
+    <location /pootle/html>
+        SetOutputFilter DEFLATE
+    </location>
+    <location /pootle/export>
+        SetOutputFilter DEFLATE
+    </location>
+</IfModule>

================================================================
Index: packages/pootle/pootle-settings.patch
diff -u /dev/null packages/pootle/pootle-settings.patch:1.1
--- /dev/null	Mon May 10 18:52:38 2010
+++ packages/pootle/pootle-settings.patch	Mon May 10 18:52:32 2010
@@ -0,0 +1,25 @@
+diff -up Pootle-2.0.0-rc2/localsettings.py.fedora-settings Pootle-2.0.0-rc2/localsettings.py
+--- Pootle-2.0.0-rc2/localsettings.py.fedora-settings	2009-11-25 13:27:26.000000000 +0200
++++ Pootle-2.0.0-rc2/localsettings.py	2009-11-27 16:02:58.000000000 +0200
+@@ -56,10 +56,10 @@ PARSE_POOL_CULL_FREQUENCY = 4
+ # By default we use Django's in memory cache which is only suitable
+ # for small deployments. memcached is prefered. For more info, check
+ # http://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache
+-CACHE_BACKEND = 'locmem:///?max_entries=4096&cull_frequency=5'
++#CACHE_BACKEND = 'locmem:///?max_entries=4096&cull_frequency=5'
+ 
+ # Uncomment to use memcached for caching
+-#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
++CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
+ 
+ # Using memcached to store sessions improves performance for anonymous
+ # users. For more info, check
+@@ -69,7 +69,7 @@ CACHE_BACKEND = 'locmem:///?max_entries=
+ #SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
+ 
+ # Uncomment this if you're using memcached as CACHE_BACKEND and running under Django 1.1
+-#SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
++SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
+ 
+ # To improve performance, non-logged users get cached copies of most pages.
+ # This variable is the number of seconds for which a page will be reused from

================================================================
Index: packages/pootle/pootle.spec
diff -u /dev/null packages/pootle/pootle.spec:1.1
--- /dev/null	Mon May 10 18:52:38 2010
+++ packages/pootle/pootle.spec	Mon May 10 18:52:32 2010
@@ -0,0 +1,132 @@
+# $Revision$, $Date$
+# TODO
+# - full webapp (all config to webapps dir)
+%define		fullname Pootle
+Summary:	Localization and translation management web application
+Name:		pootle
+Version:	2.0.3
+Release:	0.1
+License:	GPL v2+
+Group:		Development/Tools
+URL:		http://translate.sourceforge.net/wiki/pootle/index
+Source0:	http://downloads.sourceforge.net/project/translate/%{fullname}/%{version}/%{fullname}-%{version}.tar.bz2
+# Source0-md5:	6a64e49c0d19ba0d7392bb87efa213b5
+Source1:	apache.conf
+Patch0:		%{name}-settings.patch
+BuildRequires:	python-devel
+BuildRequires:	rpmbuild(macros) >= 1.228
+BuildRequires:	translate-toolkit >= 1.4.1
+Requires(post,preun):	/sbin/chkconfig
+Requires:	apache-mod_wsgi
+Requires:	group(http)
+Requires:	iso-codes
+Requires:	memcached
+Requires:	python-Levenshtein
+Requires:	python-django >= 1.0
+Requires:	python-djblets
+Requires:	python-lxml
+Requires:	python-memcached
+Requires:	python-xapian >= 1.0.13
+Requires:	rc-scripts
+Requires:	translate-toolkit >= 1.5.1
+Requires:	xapian-core
+Requires:	zip
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		_webapps	/etc/webapps
+%define		_webapp		%{name}
+
+%description
+Pootle is web application for managing distributed or crowdsourced
+translation.
+
+It's features include::
+- Translation of Gettext PO and XLIFF files.
+- Submitting to remote version control systems (VCS).
+- Managing groups of translators
+- Online webbased or offline translation
+- Quality checks
+
+%prep
+%setup -q -n %{fullname}-%{version}
+%patch0 -p1
+
+%build
+%{__python} setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install \
+	--skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+# Create the manpages
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+for program in $RPM_BUILD_ROOT%{_bindir}/*; do
+	case $(basename $program) in
+	PootleServer|import_pootle_prefs)
+		;;
+	*)
+		LC_ALL=C PYTHONPATH=. $program --manpage \
+		>  $RPM_BUILD_ROOT%{_mandir}/man1/$(basename $program).1 \
+		|| rm -f $RPM_BUILD_ROOT%{_mandir}/man1/$(basename $program).1
+		;;
+	esac
+done
+
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/pootle,%{_sharedstatedir}/pootle,%{_sysconfdir}/pootle}
+install -p $RPM_BUILD_ROOT%{_bindir}/PootleServer $RPM_BUILD_ROOT%{_sbindir}
+rm $RPM_BUILD_ROOT%{_bindir}/PootleServer
+rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/djblets
+install -p wsgi.py $RPM_BUILD_ROOT%{_datadir}/pootle
+
+install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%service httpd restart
+%service -q memcached restart
+
+%postun
+if [ "$1" -ge "1" ] ; then
+	%service httpd condrestart
+	%service -q memcached condrestart
+fi
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog README
+# We exclude docs as the Pootle installer doesn't do ${name}-${version} as expected in Fedora
+%exclude %{_datadir}/doc/pootle
+%dir %attr(750,root,http) %{_webapps}/%{_webapp}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
+%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_sbindir}/*
+%{_mandir}/man1/*
+%dir %{_sysconfdir}/pootle
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pootle/localsettings.py
+%{_datadir}/pootle
+%attr(770,root,http) %{_sharedstatedir}/pootle
+
+%{py_sitescriptdir}/*
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/05/10 16:52:32  glen
+- new, based on fc, seems starting up
+
================================================================


More information about the pld-cvs-commit mailing list