File qtermwidget.spec of Package qtermwidget

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

%define pack_summ Qt5 terminal widget
%define pack_desc QTermWidget is an opensource project originally based on KDE4 Konsole application, \
but it took its own direction later. \
The main goal of this project is to provide unicode-enabled, embeddable \
Qt widget for using as a built-in console (or terminal emulation widget).

Name:           qtermwidget
Version:        0.6.0
Release:        0
License:        GPL-2.0+
Summary:        Qt5 terminal widget
Url:            https://github.com/qterminal/qtermwidget
Group:          Development/Libraries/C and C++
Source:         %{name}-%{version}.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
%{pack_desc}

%package -n lib%{name}5-0
Summary:        %{pack_summ}
Group:          Development/Libraries/C and C++

%description -n lib%{name}5-0
%{pack_desc}

%package devel
Summary:        %{pack_summ} - devel package
Group:          Development/Libraries/C and C++
Requires:       lib%{name}5-0 = %{version}
Requires:       pkg-config

%description devel
Development environment for qtermwidget library

%prep
%setup -q

%build
%cmake \
    -DUSE_QT5=true \
    -DBUILD_DESIGNER_PLUGIN=0
%__make %{?_smp_mflags}

%install
%cmake_install

%clean
%{__rm} -rf %{buildroot}

%post -n lib%{name}5-0 -p /sbin/ldconfig

%postun -n lib%{name}5-0 -p /sbin/ldconfig

%files -n lib%{name}5-0
%defattr(-,root,root,-)
%doc AUTHORS Changelog COPYING README
%{_libdir}/lib%{name}5.so.*
%{_datadir}/%{name}5/

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}5
%{_libdir}/lib%{name}5.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/cmake/%{name}5

%changelog
openSUSE Build Service is sponsored by