po4a/po4a.spec

92 lines
2.8 KiB
RPMSpec

%bcond_with test
Name: po4a
Summary: A translation tool
Version: 0.69
Release: 2
License: GPL+
URL: https://po4a.org/
Source0: https://github.com/mquinson/po4a/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: %{_bindir}/xsltproc %{_bindir}/nsgmls
BuildRequires: coreutils grep docbook-style-xsl findutils perl-generators perl(Pod::Man)
BuildRequires: perl-interpreter >= 4:5.10.1 perl(File::Basename) perl(Module::Build)
BuildRequires: perl(lib) perl(Encode) perl(ExtUtils::Install) perl(File::stat)
BuildRequires: perl(File::Path) perl(File::Copy) perl(File::Spec) perl(Term::ReadKey)
BuildRequires: perl(Carp) gettext perl(Exporter) perl(Fcntl) perl(File::Temp) perl(Text::WrapI18N)
BuildRequires: perl(Cwd) perl(Config) perl(DynaLoader) perl(Encode::Guess) perl(subs)
BuildRequires: perl(Getopt::Std) perl(Getopt::Long) perl(IO::File) perl(Pod::Parser)
BuildRequires: perl(Pod::Usage) perl(POSIX) perl(SGMLS) >= 1.03ii perl(strict) perl(Test::More)
BuildRequires: perl(vars) perl(Time::Local) perl(warnings) perl(I18N::Langinfo)
BuildRequires: texlive-kpathsea-bin texlive-kpathsea perl(Locale::gettext) >= 1.01
BuildRequires: perl(Unicode::GCString) perl(YAML::Tiny)
Requires: gettext perl(Locale::gettext) >= 1.01 %{_bindir}/xsltproc %{_bindir}/nsgmls
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: texlive-kpathsea texlive-kpathsea-bin
Requires: perl(I18N::Langinfo) perl(Term::ReadKey) perl(Text::WrapI18N)
BuildArch: noarch
%description
The goal of po4a (PO for anything) project is to ease translations
(and more interestingly, the maintenance of translations) using gettext
tools on areas where they were not expected like documentation.
%package_help
%prep
%autosetup -p1
chmod +x scripts/*
%build
export PO4AFLAGS="-v -v -v"
LANG=en_US.utf8
%{__perl} ./Build.PL installdirs=vendor
./Build
%install
LANG=en_US.utf8
./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
%{_fixperms} %{buildroot}/*
%find_lang %{name}
%check
%if %{with test}
LANG=en_US.utf8
./Build test
%endif
%files -f %{name}.lang
%license COPYING
%{_bindir}/%{name}*
%{_bindir}/msguntypot
%{perl_vendorlib}/Locale
%files help
%doc README* TODO
%{_mandir}/man1/%{name}*.1*
%{_mandir}/man1/msguntypot.1*
%{_mandir}/man3/Locale::Po4a::*.3*
%{_mandir}/man7/%{name}.7*
%{_mandir}/*/man1/%{name}*.1*
%{_mandir}/*/man1/msguntypot.1*
%{_mandir}/*/man3/Locale::Po4a::*.3*
%{_mandir}/*/man7/%{name}.7*
%changelog
* Tue Jul 18 2023 yaoxin <yao_xin001@hoperun.com> - 0.69-2
- Fix build error caused by gettext update to 0.22
* Thu May 11 2023 xu_ping <707078654@qq.com> - 0.69-1
- update to 0.69
* Fri Aug 12 2022 tianlijing <tianlijing@kylinos.cn> - 0.66-1
- update to 0.66
* Fri Dec 6 2019 caomeng<caomeng5@huawei.com> - 0.54-2
- Package init