File qscintilla-qt4.spec of Package qscintilla-qt4

#
# spec file for package qscintilla-qt4
#
# Copyright (c) 2018 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 sonum   13
%define debug_package_requires libqscintilla2_qt4-%{sonum} = %{version}-%{release}
Name:           qscintilla-qt4
Version:        2.10.4
Release:        0
Summary:        C++ Editor Class Library
License:        GPL-3.0-only
Group:          Development/Libraries/C and C++
Url:            http://www.riverbankcomputing.co.uk/software/qscintilla/intro
Source:         QScintilla_gpl-%{version}.tar.gz
#PATCH-FIX-OPENSUSE: Adapt to the SuSE Qt4 build
Patch0:         qscintilla-qt4.diff
BuildRequires:  libdrm-devel
BuildRequires:  libqt4-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
QScintilla is a Qt port of Neil Hodgson's Scintilla C++ editor class.

This is a Qt port from the original Scintilla class
(http://www.scintilla.org/).

%package -n libqscintilla2_qt4-%{sonum}
Summary:        C++ Editor Class Library
Group:          Development/Libraries/C and C++
Provides:       qscintilla_qt4 = %{version}
# since version 2.10
Provides:       qscintilla = %{version}
Obsoletes:      qscintilla < %{version}

%description -n libqscintilla2_qt4-%{sonum}
QScintilla is a Qt port of Neil Hodgson's Scintilla C++ editor class.

This is a Qt port from the original Scintilla class
(http://www.scintilla.org/).

%package -n libqscintilla_qt4-devel
Summary:        C++ Editor Class Library Development Files
Group:          Development/Libraries/C and C++
Requires:       libqscintilla2_qt4-%{sonum} = %{version}
%requires_ge    libqt4-devel
# openSUSE 10.3
Provides:       qscintilla-devel = %{version}
Obsoletes:      qscintilla-devel < %{version}
# since version 2.10
Provides:       libqscintilla-devel = %{version}
Obsoletes:      libqscintilla-devel < %{version}

%description -n libqscintilla_qt4-devel
QScintilla is a Qt port of Neil Hodgson's Scintilla C++ editor class.

This is a Qt port from the original Scintilla class
(http://www.scintilla.org/).

This package contains the development files for %{name}.

%prep
%setup -q -n QScintilla_gpl-%{version}
%patch0

%build
pushd Qt4Qt5
qmake QMAKE_CXXFLAGS+=-std=c++11
make %{?_smp_mflags}
popd
pushd designer-Qt4Qt5
qmake QMAKE_CXXFLAGS+=-std=c++11
make %{?_smp_mflags}
popd

%install
pushd Qt4Qt5
make INSTALL_ROOT=%{buildroot} install
popd
pushd designer-Qt4Qt5
make INSTALL_ROOT=%{buildroot} install
popd

%post -n libqscintilla2_qt4-%{sonum} -p /sbin/ldconfig

%postun -n libqscintilla2_qt4-%{sonum} -p /sbin/ldconfig

%files -n libqscintilla2_qt4-%{sonum}
%defattr(-,root,root)
%doc NEWS README LICENSE
%{_datadir}/qt4/qsci
%{_datadir}/qt4/translations/qscintilla_*.qm
%{_libdir}/libqscintilla2_qt4.so.%{sonum}*

%files -n libqscintilla_qt4-devel
%defattr(-,root,root)
%{_includedir}/Qsci/
%{_libdir}/libqscintilla2_qt4.so
%{_libdir}/qt4/plugins/designer/libqscintillaplugin.so
%{_datadir}/qt4/mkspecs/features/qscintilla2.prf

%changelog
openSUSE Build Service is sponsored by