A new user interface for you! Read more...

File poxml.spec of Package poxml

#
# spec file for package poxml
#
# 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 http://bugs.opensuse.org/
#


%bcond_without lang

Name:           poxml
Version:        18.04.0
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        Tools for translating DocBook XML files with Gettext
License:        GPL-2.0 and GFDL-1.2
Group:          System/GUI/KDE
Url:            http://www.kde.org/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  antlr
BuildRequires:  antlr-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  gettext-devel
BuildRequires:  kdoctools-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a collection of tools that facilitate translating DocBook XML
files using Gettext message files (PO files).

%package -n kde-l10n-devel
Summary:        Tools for translating DocBook XML files with Gettext
Group:          System/GUI/KDE
Obsoletes:      kde4-l10n-devel < %{version}
Provides:       kde4-l10n-devel = %{version}
Recommends:     %{name}-lang
Provides:       %{name} = %{version}

%description -n kde-l10n-devel
This is a collection of tools that facilitate translating DocBook XML
files using Gettext message files (PO files).

%if %{with lang}
%lang_package
%endif

%prep
%setup -q

%build
%ifarch ppc64
RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
export CXXFLAGS="%{optflags} -fPIC"
export CFLAGS="%{optflags} -fPIC"
  %cmake_kf5 -d build -- -DCMAKE_CXXFLAGS="%{optflags}" -DCMAKE_CFLAGS="%{optflags}"
 %make_jobs
  make

%install
  %kf5_makeinstall -C build
  %if %{with lang}
    %find_lang %{name} --with-man --all-name
  %endif

%post -n kde-l10n-devel -p /sbin/ldconfig
%postun -n kde-l10n-devel -p /sbin/ldconfig

%files -n kde-l10n-devel
%defattr(-,root,root)
%doc COPYING*
%{_kf5_bindir}/po2xml
%{_kf5_bindir}/split2po
%{_kf5_bindir}/swappo
%{_kf5_bindir}/xml2pot
%{_kf5_mandir}/man1/*.*%{ext_man}

%if %{with lang}
%files lang -f %{name}.lang
%doc COPYING*
%endif

%changelog