File fontmatrix.spec of Package fontmatrix

#
# spec file for package fontmatrix
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#


Name:           fontmatrix
Version:        0.9.99~git.20171229T012935.8108e6e
Release:        0
License:        GPL-2.0
Summary:        Fonts Manager
Url:            http://www.fontmatrix.be/
Group:          Productivity/Text/Utilities
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  libpodofo-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtNetwork)
BuildRequires:  pkgconfig(QtOpenGL)
BuildRequires:  pkgconfig(QtSql)
BuildRequires:  pkgconfig(QtWebKit)
BuildRequires:  pkgconfig(QtXml)
BuildRequires:  pkgconfig(m17n-core)
BuildRequires:  pkgconfig(m17n-flt)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Fontmatrix is a font manager for Linux desktops. It can manage fonts
installed system-wide or for individual user accounts.

%package lang
Summary:        Languages for package fontmatrix
Group:          System/Localization
Requires:       %{name} = %{version}
Provides:       %{name}-lang-all = %{version}
Supplements:    packageand(bundle-lang-other:fontmatrix)
BuildArch:      noarch

%description lang
Provides translations to the package fontmatrix.

%prep
%setup -q

%build
mkdir build
cd build
cmake .. \
    -DCMAKE_BUILD_TYPE=ReleaseWithDebinfo \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DWANT_HARFBUZZ=true \
    -DWANT_M17N=true \
    -DWANT_PODOFO=true
make %{?_smp_mflags} VERBOSE=1

%install
pushd build
%make_install
popd
rm -f \
    %{buildroot}%{_datadir}/%{name}/{qm/%{name}-en.qm,resources/welcome_en.html}
%fdupes -s %{buildroot}%{_datadir}
%suse_update_desktop_file %{name}

%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING TODO
%{_bindir}/%{name}
%{_datadir}/%{name}/
%exclude %{_datadir}/%{name}/qm/
%exclude %{_datadir}/%{name}/resources/welcome_*.html
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png
%doc %{_mandir}/man?/*

%files lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}/qm/
%lang(cs) %{_datadir}/%{name}/qm/%{name}-cs.qm
%lang(da) %{_datadir}/%{name}/qm/%{name}-da.qm
%lang(de) %{_datadir}/%{name}/qm/%{name}-de.qm
%lang(fi) %{_datadir}/%{name}/qm/%{name}-fi.qm
%lang(fr) %{_datadir}/%{name}/qm/%{name}-fr.qm
%lang(hi) %{_datadir}/%{name}/qm/%{name}-hi.qm
%lang(nb) %{_datadir}/%{name}/qm/%{name}-nb.qm
%lang(nl) %{_datadir}/%{name}/qm/%{name}-nl.qm
%lang(no) %{_datadir}/%{name}/qm/%{name}-no.qm
%lang(ru) %{_datadir}/%{name}/qm/%{name}-ru.qm
%lang(sr) %{_datadir}/%{name}/qm/%{name}-sr.qm
%lang(sv) %{_datadir}/%{name}/qm/%{name}-sv.qm
%lang(uk) %{_datadir}/%{name}/qm/%{name}-uk.qm
%lang(zh_CN) %{_datadir}/%{name}/qm/%{name}-zh_CN.qm
%lang(zh_TW) %{_datadir}/%{name}/qm/%{name}-zh_TW.qm
%lang(da) %{_datadir}/%{name}/resources/welcome_da.html
%lang(de) %{_datadir}/%{name}/resources/welcome_de.html
%lang(fi) %{_datadir}/%{name}/resources/welcome_fi.html
%lang(fr) %{_datadir}/%{name}/resources/welcome_fr.html
%lang(hi) %{_datadir}/%{name}/resources/welcome_hi.html
%lang(nb) %{_datadir}/%{name}/resources/welcome_nb.html
%lang(nl) %{_datadir}/%{name}/resources/welcome_nl.html
%lang(no) %{_datadir}/%{name}/resources/welcome_no.html
%lang(ru) %{_datadir}/%{name}/resources/welcome_ru.html
%lang(sr) %{_datadir}/%{name}/resources/welcome_sr.html
%lang(sv) %{_datadir}/%{name}/resources/welcome_sv.html
%lang(uk) %{_datadir}/%{name}/resources/welcome_uk.html
%lang(zh_CN) %{_datadir}/%{name}/resources/welcome_zh_CN.html
%lang(zh_TW) %{_datadir}/%{name}/resources/welcome_zh_TW.html

%changelog