Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

104 lines (86 sloc) 3.31 kB
Name: weblate
Version: 0.10
Release: 1
License: GPL-3+
Summary: Web based translation
Group: Productivity/Networking/Web/Frontends
Source: %{name}-%{version}.tar.bz2
BuildRequires: bitstream-vera
BuildRequires: graphviz
BuildRequires: python-Sphinx
BuildRequires: graphviz-gd
Requires: apache2-mod_wsgi
Requires: cron
Requires: python-django >= 1.3
Requires: python-django-registration
Requires: python-translate-toolkit
Requires: python-GitPython >= 0.3
Requires: python-whoosh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Vendor: Michal Čihař <>
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define WLDIR /usr/share/weblate
%define WLDATADIR /var/lib/weblate
%define WLETCDIR /%{_sysconfdir}/weblate
Weblate is web based translation tool with tight Git integration. It features
simple and clean user interface, propagation of translations across subprojects
or automatic linking to source files.
List of features includes:
* Easy web based translation
* Propagation of translations across sub-projects (for different branches)
* Tight git integration - every change is represented by Git commit
* Usage of Django's admin interface
* Upload and automatic merging of po files
* Links to source files for context
* Allows to use machine translation services
* Message consistency checks
* Tunable access control
* Wide range of supported translation formats (Getext, Qt, Java, Windows, Symbian and more)
%setup -q
make -C docs html
sed -i 's@^WEB_ROOT = .*@WEB_ROOT = "%{WLDIR}/weblate"@g' weblate/
sed -i 's@^WHOOSH_INDEX = .*@WHOOSH_INDEX = "%{WLDATADIR}/whoosh-index"@g' weblate/
sed -i 's@^GIT_ROOT = .*@GIT_ROOT = "%{WLDATADIR}/repos"@g' weblate/
sed -i 's@/usr/lib/python.*/site-packages@%{python_sitelib}@g' examples/apache.conf
install -d %{buildroot}/%{WLDIR}
install -d %{buildroot}/%{WLETCDIR}
# Copy all files
cp -a . %{buildroot}/%{WLDIR}
# We ship this separately
rm -rf %{buildroot}/%{WLDIR}/docs
rm -f %{buildroot}/%{WLDIR}/README.rst \
%{buildroot}/%{WLDIR}/ChangeLog \
%{buildroot}/%{WLDIR}/COPYING \
# Byte compile python files
%py_compile %{buildroot}/%{WLDIR}
# Move configuration to etc
mv %{buildroot}/%{WLDIR}/weblate/ %{buildroot}/%{WLETCDIR}/
ln -s %{WLETCDIR}/ %{buildroot}/%{WLDIR}/weblate/
# Apache config
install -d %{buildroot}/%{_sysconfdir}/apache2/vhosts.d/
install -m 644 examples/apache.conf %{buildroot}/%{_sysconfdir}/apache2/vhosts.d/weblate.conf
# Whoosh index dir
install -d %{buildroot}/%{WLDATADIR}
install -d %{buildroot}/%{WLDATADIR}/whoosh-index
install -d %{buildroot}/%{WLDATADIR}/repos
rm -rf %{buildroot}
%doc docs/_build/html
%doc README.rst
%config(noreplace) /%{_sysconfdir}/weblate
%config(noreplace) /%{_sysconfdir}/apache2
%attr(0755,wwwrun,www) %{WLDATADIR}
%attr(0755,wwwrun,www) %{WLDATADIR}/whoosh-index
%attr(0755,wwwrun,www) %{WLDATADIR}/repos
Jump to Line
Something went wrong with that request. Please try again.