Blob Blame History Raw
Name:           deepin-gettext-tools
Version:        1.0.6
Release:        1%{?dist}
Summary:        Deepin Gettext Tools
License:        GPLv3
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  perl(Config::Tiny)
BuildRequires:  perl(Exporter::Tiny)
BuildRequires:  perl(XML::LibXML)
BuildRequires:  perl(XML::LibXML::PrettyPrint)
Requires:       gettext
Requires:       qt5-linguist
Requires:       perl(Config::Tiny)
Requires:       perl(Exporter::Tiny)
Requires:       perl(XML::LibXML)
Requires:       perl(XML::LibXML::PrettyPrint)

The tools of gettext function wrapper.

desktop-ts-convert - handling desktop file translations.
policy-ts-convert - convert PolicyKit Policy file to the ts file.
update-pot - scan msgid and generate pot file according to the ini file.
generate-mo - scan po files and generate mo files according to the ini file.

%setup -q

# fix shebang
find -iname "*.py" | xargs sed -i '1s|.*|#!%{__python3}|'
sed -i '1s|.*|#!%{__perl}|' desktop_ts/src/

sed -i 's|sudo cp|cp|' src/
sed -i 's|lconvert|lconvert-qt5|; s|deepin-lupdate|lupdate-qt5|' src/


install -d %{buildroot}%{_bindir}
install -m755 desktop_ts/src/ %{buildroot}%{_bindir}/deepin-desktop-ts-convert
install -m755 policy_ts/src/ %{buildroot}%{_bindir}/deepin-policy-ts-convert
install -m755 src/ %{buildroot}%{_bindir}/deepin-generate-mo
install -m755 src/ %{buildroot}%{_bindir}/deepin-update-pot

/bin/perl desktop_ts/src/ --help
/bin/python3 src/ --help
/bin/python3 src/ --help

%license LICENSE

* Fri Jul 14 2017 mosquito <> - 1.0.6-1
- Update to 1.0.6

* Tue Jan 17 2017 mosquito <> - 1.0.4-1
- Rebuild

* Mon Jan 16 2017 Jaroslav <> Stepanek 1.0.4-1
- Update to version 1.0.4

* Wed Oct 12 2016 Jaroslav <> Stepanek 1.0.3-1
- Initial package build