%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global fullname Pootle Name: pootle Version: 2.1.6 Release: 1%{?dist} Summary: Localization and translation management web application Group: Development/Tools License: GPLv2+ URL: http://translate.sourceforge.net/wiki/pootle/index Source: http://downloads.sourceforge.net/project/translate/%{fullname}/%{version}/%{fullname}-%{version}.tar.bz2 Source1: pootle.conf Source2: README.fedora BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: pootle-2.1.5-1-fedora-settings.patch BuildArch: noarch BuildRequires: python-devel BuildRequires: translate-toolkit >= 1.4.1 Requires: Django >= 1.0 Requires: Django-south %{?fedora:Requires: iso-codes} Requires: memcached Requires: mod_wsgi Requires: python-djblets Requires: python-lxml Requires: python-memcached Requires: python-Levenshtein # EL-5 uses Python 2.4 and thus needs sqlite2 %{?rhel:Requires: python-sqlite2} Requires: translate-toolkit >= 1.9.0 %if 0%{?rhel} >= 6 || 0%{?fedora} Requires: xapian-bindings-python >= 1.0.13 Requires: xapian-core %endif Requires: zip # This is for /sbin/service Requires(post): initscripts Requires(postun): initscripts %description Pootle is web application for managing distributed or crowdsourced translation. It's features include:: * Translation of Gettext PO and XLIFF files. * Translation of monolingual files (subtitles, Java properties, etc) * 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 -b .fedora-settings %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # Create the manpages mkdir -p $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} $RPM_BUILD_ROOT%{_datadir}/pootle/ $RPM_BUILD_ROOT%{_sharedstatedir}/pootle $RPM_BUILD_ROOT%{_sysconfdir}/pootle install $RPM_BUILD_ROOT%{_bindir}/PootleServer $RPM_BUILD_ROOT%{_sbindir} rm $RPM_BUILD_ROOT%{_bindir}/PootleServer rm -r $RPM_BUILD_ROOT%{python_sitelib}/djblets install -p --mode=644 %{SOURCE1} -D $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/pootle.conf install wsgi.py $RPM_BUILD_ROOT%{_datadir}/pootle/ cp -p %{SOURCE2} . %clean rm -rf $RPM_BUILD_ROOT %post /sbin/service httpd restart >/dev/null 2>&1 || : /sbin/service memcached restart >/dev/null 2>&1 || : %postun if [ "$1" -ge "1" ] ; then /sbin/service httpd condrestart >/dev/null 2>&1 || : /sbin/service memcached condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc COPYING ChangeLog README README.fedora %{_bindir}/* %{_sbindir}/* %{_mandir}/man1/* %config(noreplace) %{_sysconfdir}/pootle %config(noreplace) %{_sysconfdir}/httpd/conf.d/pootle.conf %{python_sitelib}/* %{_datadir}/pootle %if 0%{?rhel} >= 6 || 0%{?fedora} %attr(2770,apache,apache) %{_sharedstatedir}/pootle %else %attr(2770,apache,apache) /var/lib/pootle %endif # We exclude docs as the Pootle installer doesn't do ${name}-${version} as expected in Fedora %exclude %{_datadir}/doc/pootle %changelog * Sat Apr 16 2011 Dwayne Bailey <dwayne@translate.org.za> - 2.1.6-1 - Update to 2.1.6 - Ensure compatability with Django 1.2.5 and 1.3.0 (require Translate Toolkit >= 1.9.0) - Other fixes: - Fixed another bug with GNU style projects language detection. - Added a separate project type for UTF-8 encoded Java properties. - Fixed a bug that would under rare conditions hide some strings from translate page. - Fixed a bug that caused some translation project level statistics to be miscalculated. - Fix for Qt TS format based on changes in Translate Toolkit 1.9.0 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Jan 18 2011 Dwayne Bailey <dwayne@translate.org.za> - 2.1.5-1 - Update to 2.1.5 - Fix regression causing update from templates to fail for GNU Style projects with subdirectories. - Fix regression in handling obsolete units while committing to version control (reported by Mozilla). - Clean stale file locks left in cases of external kills which running expensive commands. - Fix security bug where project names would leak to users without view access on the server via news summary on front page or profile edit form. - Fix a bug that prevented Project level permissions from overriding very restrictive server wide permissions. - Refresh Fedora settings patch * Fri Dec 17 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.4-1 - Update to 2.1.4 - Fix quality checks update on file uploads. - Qt ts plurals should now work correctly. - Fix obsolete units now updated when uploading a new file version. - Fix server errors when using turkish Locale. - Fix pt_BR detected as Brazillian Portoguese not Breton * Fri Nov 19 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.3-1 - Update to 2.1.3 - Fix data loss bug, recent translations lost when updating from version control - Java properties accepted in any encoding, including UTF-8 - New translations: Chiga, Latvian - Fix for database migration failing for some users - Fix for errors on upgrades for users who deleted the English language - Fix for errors on filenames with spaces and memcached - Many fixes to language detection in GNU Style projects - Various fixes to handling of escaped characters on the translate page * Fri Oct 29 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.2-1 - Update to 2.1.2 - Fix XSS on translate page - Improved monolingual support - Improved GNU style project support - New translations: Zulu, Greek, Danish, Acoli and Fulah - Completed translations: Uighur, Chinese (China), Catalan, Asturian, Akan and Ganda - Various bug fixes * Wed Sep 8 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.1-3 - New upstream 2.1.1 to fix broken translations (version unchanged) * Sat Sep 4 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.1-2 - Updated README.fedora with more SELinux information * Sat Sep 4 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.1-1 - Update to 2.1.1 - Ability to migrate data between different database engines - New translations: Slovenian, Songhai, Tamil and Faroese - New Apertium API - Better caching for imporove performance - Save to disk only when there are new translations - Cache exported ZIP archives and XLIFF files - Fixed a bug where Pootle kept files open even when not needed. - Better handling of invalid file types on upload - Don't accept empty suggestions - HTML registration emails - Refresh fedora-settings patch * Fri Sep 3 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.0-5 - Set default rights for /var/lib/pootle * Wed Aug 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.0-4 - Improve README.fedora to deal with SELinux * Wed Aug 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.0-3 - Require Translate Toolkit >= 1.8.0 to fix some multistring issues * Wed Aug 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.0-2 - Fix %%if logic for RHEL and Fedora versions * Wed Aug 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.1.0-1 - Update to 2.1.0 - Improved performance, concurrency and memory consumption - UI improvements for translators - Machine translation - Terminology extraction - Formats: Support for monolingual formats without conversion - Java properties - Mac OSX strings - PHP arrays - Subtitle files - Haiku catkeys - Offline translation in XLIFF for all formats - Reviewing suggestions offline with the XLIFF alt-trans tag - New admin dashboard, contact form - Captcha support to combat spam - Several new batch operations via the command-line - Require Django-south for database migration * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Mar 25 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.3-1 - Update to 2.0.3 - Support for Qt TS files - Support for TMX and TBX files - Corrections to PostgreSQL support (#1368) - Some improvements to memory use - Timestamps for news items when viewed on the web - It is possible to change tree style more reliably (#1363) - More correct method for finding alternative translations - A complete translation into Asturian, and other translation updates - Update to 2.0.2 - Don't count the templates towards the front page statistics (#1345) - Fix password change/reset links work without registration (#1350) - Allow deleting translator comments (#1349) - Show the date of items on the news page - New and updated translations, including Luganda, Punjabi and Asturian - Remove djblets from external_apps, use the Fedora package instead * Mon Jan 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.1-5 - Require python-sqlite2 as its not included in Python 2.4 * Mon Jan 18 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.1-4 - Drop Xapian and ISO code support as they're not packaged for EL-5 * Sun Jan 17 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.1-3 - Can't use %%{_sharedstatedir} * Thu Jan 14 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.1-2 - Fixes from spec review * Thu Jan 14 2010 Dwayne Bailey <dwayne@translate.org.za> - 2.0.1-1 - Update to 2.0.1 * Mon Dec 7 2009 Dwayne Bailey <dwayne@translate.org.za> - 2.0.0-1 - Update to 2.0.0 final - Prefer running under Apache and drop standalone supporting infrastructure * Fri Nov 27 2009 Dwayne Bailey <dwayne@translate.org.za> - 2.0.0-0.1.rc2 - Update to 2.0.0 rc2 * Thu Nov 5 2009 Dwayne Bailey <dwayne@translate.org.za> - 1.3.0-0.3 - Depend on mod_wsgi * Mon Nov 2 2009 Dwayne Bailey <dwayne@translate.org.za> - 1.3.0-0.2 - Update to 1.3.0 beta4 - Enable mod_wsgi operation: require httpd, default pootle.conf - Backport DB initialisation - Add dependencies for performance: memcached, Levenshtein, xapian - Fedora README * Thu Jan 8 2009 Dwayne Bailey <dwayne@translate.org.za> - 1.3.0-0.1 - Django based Pootle * Mon Oct 6 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-1 - Update to final 1.2.0 release * Tue Sep 30 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-0.5.rc1 - Update to RC1 * Tue Sep 2 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-0.4.beta2 - Create run_pootle.sh wrapper for server * Wed Aug 27 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-0.3.beta2 - Create man pages - Rebuild with a refreshed tarball that contains jquery * Wed Aug 27 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-0.2.beta2 - Update to 1.2.0-beta2 - Fix initscript installation location * Sun Aug 24 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.2.0-0.1.beta1 - Build for 1.2.0-beta1 release - Create initscripts, sysconfig; create proper logging; configure stats database * Thu Feb 14 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.0.2-1 - Rebuild for fc9 * Thu Feb 14 2008 Dwayne Bailey <dwayne@translate.org.za> - 1.0.2-1 - Initial packaging