itstool/itstool.spec

62 lines
1.8 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package itstool
#
# Copyright (c) 2024 SUSE LLC
#
# 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.
Accepting request 659962 from GNOME:Next All of PPC built now :-) Seems we can finally move forward with this one. Fedora is already shipping this version. - Update to version 2.0.5: + Allow preserveSpace on XML attributes. + Fixed issue with writing files under macOS. + Fixed various differences between Python 2 and 3. + Fixed issues with libxml2 memory management. - Add itstool-Apply-ITS-files.patch: Apply ITS files passed with -i in --join mode. - Drop patch itstool-2.0.4-serialize_to_str.patch and itstool-2.0.4-memory-management.patch: fixed upstream. - Switch directly to py3 istool, as it seems it does not break there should be no real requirement to use the python2 variant (even on old products it should be ok to use py3 one) - Add patch itstool-2.0.4-serialize_to_str.patch to fix upstream big #19 (fix str/bytes issue) - Be consistent in using python%{_python_ver} - Modernize spec-file by calling spec-cleaner - Introduce _python_ver variable, currently set to '2': allow for an easy way to toggle between python3 and python2 based itstool. Currently using python2, as python3-based itstool still has issues. - Switch to python3 version: + Add python3-base BuildRequires: unlike python2, py3 is not implicit in the buildroot yet. + Export PYTHON=python3 before configure. + Replace libxml2-python (Build)?Requires with python3-libxml2-python. - Replace itstool-2.0.4-no-freedoc.patch with itstool-2.0.4-memory-management.patch: use upstream provided solution for the crshes. - Update to version 2.0.4: + Fixed a massive performance issue. - Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid crashes (gh#itstool/itstool#17). - Update to version 2.0.3: + Added: - Python 3 support. Keeping Python 2 support for now. - --path option for extra paths for ITS files. + Fixed: - --keep-entities mode after some libxml2 changes. - UTF-8 handling for translated attributes. + Don't error out (except under -s) for mismatched placeholders. OBS-URL: https://build.opensuse.org/request/show/659962 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=26
2018-12-21 09:46:55 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: itstool
Version: 2.0.7
Release: 0
Summary: Tool to translate XML documents using PO files
Accepting request 659962 from GNOME:Next All of PPC built now :-) Seems we can finally move forward with this one. Fedora is already shipping this version. - Update to version 2.0.5: + Allow preserveSpace on XML attributes. + Fixed issue with writing files under macOS. + Fixed various differences between Python 2 and 3. + Fixed issues with libxml2 memory management. - Add itstool-Apply-ITS-files.patch: Apply ITS files passed with -i in --join mode. - Drop patch itstool-2.0.4-serialize_to_str.patch and itstool-2.0.4-memory-management.patch: fixed upstream. - Switch directly to py3 istool, as it seems it does not break there should be no real requirement to use the python2 variant (even on old products it should be ok to use py3 one) - Add patch itstool-2.0.4-serialize_to_str.patch to fix upstream big #19 (fix str/bytes issue) - Be consistent in using python%{_python_ver} - Modernize spec-file by calling spec-cleaner - Introduce _python_ver variable, currently set to '2': allow for an easy way to toggle between python3 and python2 based itstool. Currently using python2, as python3-based itstool still has issues. - Switch to python3 version: + Add python3-base BuildRequires: unlike python2, py3 is not implicit in the buildroot yet. + Export PYTHON=python3 before configure. + Replace libxml2-python (Build)?Requires with python3-libxml2-python. - Replace itstool-2.0.4-no-freedoc.patch with itstool-2.0.4-memory-management.patch: use upstream provided solution for the crshes. - Update to version 2.0.4: + Fixed a massive performance issue. - Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid crashes (gh#itstool/itstool#17). - Update to version 2.0.3: + Added: - Python 3 support. Keeping Python 2 support for now. - --path option for extra paths for ITS files. + Fixed: - --keep-entities mode after some libxml2 changes. - UTF-8 handling for translated attributes. + Don't error out (except under -s) for mismatched placeholders. OBS-URL: https://build.opensuse.org/request/show/659962 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=26
2018-12-21 09:46:55 +01:00
License: GPL-3.0-or-later
Group: Development/Tools/Other
Accepting request 659962 from GNOME:Next All of PPC built now :-) Seems we can finally move forward with this one. Fedora is already shipping this version. - Update to version 2.0.5: + Allow preserveSpace on XML attributes. + Fixed issue with writing files under macOS. + Fixed various differences between Python 2 and 3. + Fixed issues with libxml2 memory management. - Add itstool-Apply-ITS-files.patch: Apply ITS files passed with -i in --join mode. - Drop patch itstool-2.0.4-serialize_to_str.patch and itstool-2.0.4-memory-management.patch: fixed upstream. - Switch directly to py3 istool, as it seems it does not break there should be no real requirement to use the python2 variant (even on old products it should be ok to use py3 one) - Add patch itstool-2.0.4-serialize_to_str.patch to fix upstream big #19 (fix str/bytes issue) - Be consistent in using python%{_python_ver} - Modernize spec-file by calling spec-cleaner - Introduce _python_ver variable, currently set to '2': allow for an easy way to toggle between python3 and python2 based itstool. Currently using python2, as python3-based itstool still has issues. - Switch to python3 version: + Add python3-base BuildRequires: unlike python2, py3 is not implicit in the buildroot yet. + Export PYTHON=python3 before configure. + Replace libxml2-python (Build)?Requires with python3-libxml2-python. - Replace itstool-2.0.4-no-freedoc.patch with itstool-2.0.4-memory-management.patch: use upstream provided solution for the crshes. - Update to version 2.0.4: + Fixed a massive performance issue. - Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid crashes (gh#itstool/itstool#17). - Update to version 2.0.3: + Added: - Python 3 support. Keeping Python 2 support for now. - --path option for extra paths for ITS files. + Fixed: - --keep-entities mode after some libxml2 changes. - UTF-8 handling for translated attributes. + Don't error out (except under -s) for mismatched placeholders. OBS-URL: https://build.opensuse.org/request/show/659962 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=26
2018-12-21 09:46:55 +01:00
URL: http://itstool.org
Source: http://files.itstool.org/itstool/%{name}-%{version}.tar.bz2
Accepting request 659962 from GNOME:Next All of PPC built now :-) Seems we can finally move forward with this one. Fedora is already shipping this version. - Update to version 2.0.5: + Allow preserveSpace on XML attributes. + Fixed issue with writing files under macOS. + Fixed various differences between Python 2 and 3. + Fixed issues with libxml2 memory management. - Add itstool-Apply-ITS-files.patch: Apply ITS files passed with -i in --join mode. - Drop patch itstool-2.0.4-serialize_to_str.patch and itstool-2.0.4-memory-management.patch: fixed upstream. - Switch directly to py3 istool, as it seems it does not break there should be no real requirement to use the python2 variant (even on old products it should be ok to use py3 one) - Add patch itstool-2.0.4-serialize_to_str.patch to fix upstream big #19 (fix str/bytes issue) - Be consistent in using python%{_python_ver} - Modernize spec-file by calling spec-cleaner - Introduce _python_ver variable, currently set to '2': allow for an easy way to toggle between python3 and python2 based itstool. Currently using python2, as python3-based itstool still has issues. - Switch to python3 version: + Add python3-base BuildRequires: unlike python2, py3 is not implicit in the buildroot yet. + Export PYTHON=python3 before configure. + Replace libxml2-python (Build)?Requires with python3-libxml2-python. - Replace itstool-2.0.4-no-freedoc.patch with itstool-2.0.4-memory-management.patch: use upstream provided solution for the crshes. - Update to version 2.0.4: + Fixed a massive performance issue. - Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid crashes (gh#itstool/itstool#17). - Update to version 2.0.3: + Added: - Python 3 support. Keeping Python 2 support for now. - --path option for extra paths for ITS files. + Fixed: - --keep-entities mode after some libxml2 changes. - UTF-8 handling for translated attributes. + Don't error out (except under -s) for mismatched placeholders. OBS-URL: https://build.opensuse.org/request/show/659962 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=26
2018-12-21 09:46:55 +01:00
BuildRequires: python3-base
BuildArch: noarch
%if 0%{?sle_version}
BuildRequires: python3-libxml2-python
Requires: python3-libxml2-python
%else
BuildRequires: python3-libxml2
Requires: python3-libxml2
%endif
%description
ITS Tool extracts messages from XML files and outputs PO template files, then
merges translations from MO files to create translated XML files. It determines
what to translate and how to chunk it into messages using the W3C
Internationalization Tag Set (ITS).
%prep
%autosetup -p1
%build
export PYTHON=$(realpath %{_bindir}/python3)
%configure
%make_build
%install
%make_install PYTHON=$(realpath %{_bindir}/python3)
%files
Accepting request 659962 from GNOME:Next All of PPC built now :-) Seems we can finally move forward with this one. Fedora is already shipping this version. - Update to version 2.0.5: + Allow preserveSpace on XML attributes. + Fixed issue with writing files under macOS. + Fixed various differences between Python 2 and 3. + Fixed issues with libxml2 memory management. - Add itstool-Apply-ITS-files.patch: Apply ITS files passed with -i in --join mode. - Drop patch itstool-2.0.4-serialize_to_str.patch and itstool-2.0.4-memory-management.patch: fixed upstream. - Switch directly to py3 istool, as it seems it does not break there should be no real requirement to use the python2 variant (even on old products it should be ok to use py3 one) - Add patch itstool-2.0.4-serialize_to_str.patch to fix upstream big #19 (fix str/bytes issue) - Be consistent in using python%{_python_ver} - Modernize spec-file by calling spec-cleaner - Introduce _python_ver variable, currently set to '2': allow for an easy way to toggle between python3 and python2 based itstool. Currently using python2, as python3-based itstool still has issues. - Switch to python3 version: + Add python3-base BuildRequires: unlike python2, py3 is not implicit in the buildroot yet. + Export PYTHON=python3 before configure. + Replace libxml2-python (Build)?Requires with python3-libxml2-python. - Replace itstool-2.0.4-no-freedoc.patch with itstool-2.0.4-memory-management.patch: use upstream provided solution for the crshes. - Update to version 2.0.4: + Fixed a massive performance issue. - Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid crashes (gh#itstool/itstool#17). - Update to version 2.0.3: + Added: - Python 3 support. Keeping Python 2 support for now. - --path option for extra paths for ITS files. + Fixed: - --keep-entities mode after some libxml2 changes. - UTF-8 handling for translated attributes. + Don't error out (except under -s) for mismatched placeholders. OBS-URL: https://build.opensuse.org/request/show/659962 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=26
2018-12-21 09:46:55 +01:00
%license COPYING
%doc ChangeLog NEWS
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_mandir}/man1/itstool.1%{?ext_man}
%changelog