File python3-qscintilla-qt5.spec of Package qscintilla-qt5

#
# spec file for package python3-qscintilla-qt5
#
# Copyright (c) 2014 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:           python3-qscintilla-qt5
Version:        2.9
Release:        0
Summary:        Python 3 Bindings for the C++ Editor Class Library
License:        GPL-3.0
Group:          Development/Libraries/C and C++
Url:            http://www.riverbankcomputing.co.uk/software/qscintilla/intro
Source:         http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-%{version}/QScintilla-gpl-%{version}.tar.gz
#PATCH-FIX-OPENSUSE: Rename qscintilla2 to qscintilla2-qt5:
Patch0:         python-config.diff
BuildRequires:  libqscintilla-qt5-devel
BuildRequires:  python3-devel
BuildRequires:  python3-qt5
BuildRequires:  python3-qt5-devel
BuildRequires:  python3-sip >= 4.16.9
BuildRequires:  python3-sip-devel >= 4.16.9
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Widgets)
Requires:       python(abi) = %{py3_ver}
Requires:       python3-qt5
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/).

This package is mainly used by eric, the Python IDE.

%prep
%setup -q -n QScintilla-gpl-%{version}
%patch0 -p1

%build
pushd Python
python3 configure.py --pyqt=PyQt5 --qmake=%{_bindir}/qmake-qt5
popd

%install
pushd Python
make DESTDIR=%{buildroot} install %{?_smp_mflags} INSTALL_ROOT=%{buildroot}
rm -rf %{buildroot}%{_datadir}/sip/PyQt5/Qsci
mv %{buildroot}%{_datadir}/qt5/qsci/api/python %{buildroot}%{_datadir}/qt5/qsci/api/python3
popd

%files
%defattr(-,root,root)
%doc NEWS README LICENSE
%{python3_sitearch}/PyQt5/Qsci.so
%{_datadir}/qt5/qsci
%{_datadir}/qt5/qsci/api
%{_datadir}/qt5/qsci/api/python3
%{_datadir}/qt5/qsci/api/python3/QScintilla2.api

%changelog
openSUSE Build Service is sponsored by