po4a/po4a.spec

160 lines
4.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package po4a
#
# Copyright (c) 2023 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: po4a
Version: 0.69
Release: 0
Summary: Framework to translate documentation and other materials
License: GPL-2.0-only
%if "%{_vendor}" == "debbuild"
Group: text
%else
Group: Development/Tools/Other
%endif
URL: https://po4a.org/
Source: https://github.com/mquinson/po4a/releases/download/v%{version}/%{name}-%{version}.tar.gz
%if "%{_vendor}" == "debbuild"
BuildRequires: deb-perl-macros
BuildRequires: docbook
BuildRequires: docbook-xml
BuildRequires: docbook-xsl
BuildRequires: gettext
BuildRequires: libmodule-build-perl
BuildRequires: libpod-parser-perl
BuildRequires: libsgmls-perl
BuildRequires: libterm-readkey-perl
BuildRequires: libunicode-linebreak-perl
BuildRequires: libyaml-tiny-perl
BuildRequires: perl
BuildRequires: texlive-binaries
BuildRequires: texlive-latex-base
BuildRequires: xsltproc
%else
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt-tools
BuildRequires: perl-Module-Build >= 0.40
BuildRequires: perl-SGMLS >= 1.03ii
BuildRequires: perl-Term-ReadKey
BuildRequires: perl-Test-Pod
BuildRequires: perl-Text-WrapI18N
BuildRequires: perl-Unicode-LineBreak
BuildRequires: perl-YAML-Tiny
BuildRequires: perl-base
BuildRequires: perl-gettext >= 1.01
BuildRequires: perl(Pod::Parser)
BuildRequires: perl(Syntax::Keyword::Try)
# for test suite
BuildRequires: docbook_4
BuildRequires: iso_ent
%endif
BuildRequires: opensp
%{perl_requires}
%if "%{_vendor}" == "debbuild"
#Requires: ${misc:Depends}
Requires: gettext
Requires: libpod-parser-perl
Requires: libsgmls-perl
Requires: libyaml-tiny-perl
Requires: opensp
Recommends: liblocale-gettext-perl
Recommends: libterm-readkey-perl
Recommends: libtext-wrapi18n-perl
Recommends: libunicode-linebreak-perl
%else
Requires: gettext-tools
Requires: perl-SGMLS
Requires: perl-YAML-Tiny
Requires: perl(Pod::Parser)
Requires: perl(Syntax::Keyword::Try)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%lang_package
%endif
%description
Po4a extracts the translatable material from its input in a PO file.
When the PO file is translated, it re-injects the translation in the structure of the document,
and generates the translated document.
If a string is not translated (i.e. it was not translated or it is "fuzzy"
because the original document was updated), the original string is used.
This permits to provide always up-to-date documentation.
po4a supports currently the following formats:
* manpages
* POD
* XML (generic, DocBook, XHTML, Dia, Guide, or WML)
* SGML
* TeX (generic, LaTeX, BibTex or Texinfo)
* text (simple text files with some formatting, markdown, rubydoc or AsciiDoc)
* INI
* YAML
* KernelHelp
%prep
%setup -q
%build
perl Build.PL installdirs=vendor
./Build
%install
./Build install destdir=%{buildroot} create_packlist=0
%find_lang %{name} --with-man --all-name
%check
# requires texlive, which is too heavy for the package
rm -rf t/fmt-tex.t t/fmt/tex
Accepting request 669920 from home:elchevive:branches:devel:languages:perl - updated to version 0.55 AsciiDoc: * Fix Asciidoc unindented lists * Make Asciidoc Tables nowrap and support current format * Do not include table fences in pot file * Add option to prevent translation of target of image blocks Markdown: * Improve markdown ruler parsing, and add test. * Add markdown fenced code block parsing, and add test. Sgml: * Avoid deprecated unescaped left brace in regex to get ready for Perl 5.32. (deb#903735) TransTractor: * Ensure to split lines before addendum operation without loss or addition of newline. With this change, addendum behavior is more intuitive.(deb#518218) Wml: * Fix longstanding error regarding comments at the beginning of a file. Xml, Docbook: * Document XML tag behavior customization with example to help use case specific customization. (deb#515763) * Debug output enhancement to help people understand what exactly happening inside po4a. * Extensive POD and code comment additions and updates. po4a tool: * Add pot_in feature to support the secondary master file for the base of POT/PO file generation. Test: * Add XML test cases with po4a including addendum, tag customization, and pot_in feature. Translations: New translation to Chinese and Chinese Simplified Updated: Dutch, Estonian, French German, Italian, Norwegian Bokmål, Portuguese (Brazil), Russian, Spanish, Swedish, Ukrainian and Vietnamese. OBS-URL: https://build.opensuse.org/request/show/669920 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/po4a?expand=0&rev=50
2019-02-01 19:33:32 +00:00
#run the tests
./Build test
%files
%defattr(644,root,root,755)
%doc NEWS README* TODO
%license COPYING
%attr(755,root,root) %{_bindir}/*
%dir %{perl_vendorlib}/Locale/
%{perl_vendorlib}/Locale/Po4a
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_mandir}/ca
%dir %{_mandir}/de
%dir %{_mandir}/es
%dir %{_mandir}/fr
%dir %{_mandir}/it
%dir %{_mandir}/ja
%dir %{_mandir}/nb
%dir %{_mandir}/nl
%dir %{_mandir}/pl
%dir %{_mandir}/pt
%dir %{_mandir}/pt_BR
%dir %{_mandir}/ru
%dir %{_mandir}/sr_Cyrl
%dir %{_mandir}/uk
Accepting request 669920 from home:elchevive:branches:devel:languages:perl - updated to version 0.55 AsciiDoc: * Fix Asciidoc unindented lists * Make Asciidoc Tables nowrap and support current format * Do not include table fences in pot file * Add option to prevent translation of target of image blocks Markdown: * Improve markdown ruler parsing, and add test. * Add markdown fenced code block parsing, and add test. Sgml: * Avoid deprecated unescaped left brace in regex to get ready for Perl 5.32. (deb#903735) TransTractor: * Ensure to split lines before addendum operation without loss or addition of newline. With this change, addendum behavior is more intuitive.(deb#518218) Wml: * Fix longstanding error regarding comments at the beginning of a file. Xml, Docbook: * Document XML tag behavior customization with example to help use case specific customization. (deb#515763) * Debug output enhancement to help people understand what exactly happening inside po4a. * Extensive POD and code comment additions and updates. po4a tool: * Add pot_in feature to support the secondary master file for the base of POT/PO file generation. Test: * Add XML test cases with po4a including addendum, tag customization, and pot_in feature. Translations: New translation to Chinese and Chinese Simplified Updated: Dutch, Estonian, French German, Italian, Norwegian Bokmål, Portuguese (Brazil), Russian, Spanish, Swedish, Ukrainian and Vietnamese. OBS-URL: https://build.opensuse.org/request/show/669920 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/po4a?expand=0&rev=50
2019-02-01 19:33:32 +00:00
%dir %{_mandir}/zh_CHS
%dir %{_mandir}/zh_Hant
%changelog