Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.2:Update
translate-toolkit
translate-toolkit.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File translate-toolkit.spec of Package translate-toolkit
# # spec file for package translate-toolkit # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: translate-toolkit Version: 1.12.0 Release: 0 Summary: Tools and API to assist with translation and software localization License: GPL-2.0+ Group: Development/Tools/Other Url: http://toolkit.translatehouse.org/ Source: http://sourceforge.net/projects/translate/files/Translate%20Toolkit/%{version}/%{name}-%{version}.tar.bz2 BuildRequires: fdupes BuildRequires: python-devel BuildRequires: gaupol BuildRequires: gettext-runtime BuildRequires: iso-codes BuildRequires: python-utidy BuildRequires: python-Levenshtein BuildRequires: python-iniparse BuildRequires: gaupol Requires: gettext-runtime # The following are for the full experience of translate-toolkit BuildRequires: python-pyenchant Requires: python-aeidon Requires: python-iniparse Requires: python-Levenshtein Requires: python-lxml Requires: python-pyenchant Requires: python-simplejson Requires: vobject Recommends: iso-codes Recommends: gaupol Recommends: python-utidy Provides: python-translate-toolkit = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch # The following are needed for man page and docs generation BuildRequires: python-lxml BuildRequires: python-lxml-doc BuildRequires: python-pytest BuildRequires: python-simplejson BuildRequires: python-Sphinx BuildRequires: python-xapian BuildRequires: python-xml BuildRequires: python-Babel BuildRequires: python-beautifulsoup4 BuildRequires: vobject %py_requires %description The Translate Toolkit is a set of software and documentation designed to help make the lives of localizers both more productive and less frustrating. The software includes programs to convert localization formats to the common PO, and emerging XLIFF format. There are also programs to check and manage PO and XLIFF files. Online documentation includes guides on using the tools, running a localization project and how to localize various projects from OpenOffice.org to Mozilla. At its core the software contains a set of classes for handling various localization storage formats: DTD, properties, OpenOffice.org GSI/SDF, CSV, MO, Qt .ts, TMX, TBX, WordFast txt, Gettext .mo, Windows RC, and of course PO and XLIFF. It also provides scripts to convert between these formats. Also part of the Toolkit are Python programs to create word counts, merge translations and perform various checks on translation files. %package devel-doc Summary: Tools and API to assist with translation and software localization Group: Development/Libraries/Python Requires: %{name} = %{version} BuildArch: noarch Provides: %{name}-devel = %{version} Obsoletes: %{name}-devel < %{version} %description devel-doc The %{name}-devel-doc package contains Translate Toolkit API documentation for developers wishing to build new tools for the toolkit or to use the libraries in other localization tools. %prep %setup -q %__sed -i 296"s|'share'|'translate/share'|" setup.py # fix for bnc#750652 - remove Apache-2.0 file - difflib is the fallback solution rm translate/misc/diff_match_patch.py* #<-- disabled, causing build issues #having disabled, have to fix shebang #%__sed -i 1d translate/misc/diff_match_patch.py #Fix for shebang errors: for lib in translate/{*.py,*/*.py,*/*/*.py}; do sed -i '\|/usr/bin/env |d' $lib done # move langmodels to site-packages #%__mv share translate #fix wrong perms chmod a-x docs/_build/html/_static/font/*.* docs/_themes/sphinx-bootstrap/static/font/*.* #fix line terminators in jquery.js %__sed -i 's/\r//' docs/_build/html/_static/jquery.js %__sed -i 's/\r//' docs/_themes/sphinx-bootstrap/static/jquery.js %build %__python setup.py build pushd docs %{__make} html man %__gzip -9 _build/man/*.1 #no hidden files find _build -name '.?*' -exec rm '{}' \+ popd %install %__python setup.py install --prefix=%{_prefix} --root=%{buildroot} # create manpages mkdir -p %{buildroot}/%{_mandir}/man1 for program in %{buildroot}/%{_bindir}/*; do case $(basename $program) in pocompendium|poen|pomigrate2|popuretext|poreencode|posplit|pocount|poglossary|lookupclient.py|tmserver|build_tmdb) ;; *) LC_ALL=C PYTHONPATH=. $program --manpage \ > %{buildroot}/%{_mandir}/man1/$(basename $program).1 \ || rm -f %{buildroot}/%{_mandir}/man1/$(basename $program).1 ;; esac done install -m 644 docs/_build/man/*.gz %{buildroot}/%{_mandir}/man1/ # remove documentation files from site-packages #rm %{buildroot}/%{python_sitelib}/translate/{COPYING,README.rst} # move documentation files to datadir %__install -d -m 755 %{buildroot}%{_defaultdocdir}/%{name} mv %{buildroot}%{python_sitelib}/translate/docs/_build/html %{buildroot}%{_defaultdocdir}/%{name} #mv %{buildroot}/home/abuild/.local/lib/python%{py_ver}/site-packages/docs/_build/html %{buildroot}%{_defaultdocdir}/%{name} rm -rf %{buildroot}%{python_sitelib}/translate/docs rm -rf %{buildroot}/home/abuild/.local/lib/python%{py_ver}/site-packages/ # create symlinks for man pages %fdupes -s %{buildroot}/%{_mandir} # create hardlinks for the rest %fdupes %{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root) %exclude %{_defaultdocdir}/%{name}/html/api %exclude %{_defaultdocdir}/%{name}/html/_sources %doc COPYING README.rst %{_bindir}/* %{_mandir}/man1/* %{python_sitelib}/translate %{python_sitelib}/translate_toolkit-%{version}-py%{py_ver}.egg-info %files devel-doc %defattr(-,root,root) %doc %{_defaultdocdir}/%{name}/html/api %doc %{_defaultdocdir}/%{name}/html/_sources %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor