File qterminal.spec of Package qterminal

#
# spec file for package qterminal
#
# Copyright (c) 2016 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/
#


%define _qtver 5.10.0
Name:           qterminal
Version:        @SERVICE@
Release:        0
Summary:        A Qt-based terminal emulator
License:        GPL-2.0
Group:          System/X11/Terminals
Url:            http://lxqt.org
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  lxqt-build-tools
BuildRequires:  pkgconfig(lxqt)
BuildRequires:  pkgconfig
BuildRequires:  qtermwidget-qt5-devel
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Core) >= %{_qtver}
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  utf8proc-devel
Requires(post): desktop-file-utils
Requires(pre):  desktop-file-utils
Recommends:     %{name}-lang = %{version}-%{release}

%description
The lightweight Qt terminal emulator.

%lang_package

%prep
%setup -q
sed -i '/default_font\.setPointSize/s/12/11/' src/properties.cpp
sed -i '/tabsPos = m_settings/s/0/1/' src/properties.cpp
sed -i '/FixedTabWidth/s/true/false/' src/properties.cpp
sed -i 's/600/960/;s/420/540/' src/forms/qterminal.ui

%build
%cmake \
    -DUSE_QT5=ON \
    -DUSE_SYSTEM_QXT=OFF
make %{?_smp_mflags}

%install
%cmake_install

%find_lang %{name} --with-qt

%if 0%{?suse_version} < 1500
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE README.md CONTRIBUTING*
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-drop.desktop
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/%{name}.metainfo.xml
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}_bookmarks_example.xml
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations/%{name}_arn.qm
%{_datadir}/%{name}/translations/%{name}_ast.qm

%changelog
openSUSE Build Service is sponsored by