File deepin-gettext-tools.spec of Package deepin-gettext-tools

# spec file for package deepin-gettext-tools
# Copyright (c) 2017 SUSE LINUX 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

Name:           deepin-gettext-tools
Version:        1.0.8
Release:        0
License:        GPL-3.0+
Summary:        Deepin wrapper for gettext
Group:          Development/Tools/Other
BuildArch:      noarch
BuildRequires:  python
Requires:       gettext
Requires:       python3
Requires:       perl(Config::Tiny)
Requires:       perl(Exporter::Tiny)
Requires:       perl(XML::LibXML)
Requires:       perl(XML::LibXML::PrettyPrint)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The tools of gettext function wrapper.

Currently supported languages: Python, QML, Go lang

%setup -q
# fix shebang
find -iname "*.py" | xargs sed -i '1s|.*|#!%{_bindir}/python3|'
sed -i '1s|.*|#!%{__perl}|' src/
sed -i 's|sudo cp|cp|' src/
sed -i 's|lconvert|lconvert-qt5|; s|deepin-lupdate|lupdate-qt5|' src/

make %{?_smp_mflags}

make install \
             DESTDIR=%{buildroot} \
             PREFIX=%{_prefix} \

#Fix permission
chmod +x %{buildroot}%{_libexecdir}/%{name}/*.py

%doc LICENSE debian/copyright debian/changelog
%dir %{_libexecdir}/%{name}

openSUSE Build Service is sponsored by