File qscintilla.spec of Package qscintilla

#
# spec file for package qscintilla (Version 2.4.5)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           qscintilla
BuildRequires:  libjpeg-devel qt3-devel-tools
BuildRequires:  libdrm-devel libqt4-devel
Url:            http://www.riverbankcomputing.co.uk/qscintilla
License:        GPLv2+
Group:          Development/Libraries/C and C++
Summary:        C++ Editor Class Library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        2.4.5
Release:        1
%define scintilla_version %version
Source:         QScintilla-gpl-%scintilla_version.tar.bz2
Patch:          %name.diff
%define debug_package_requires libqscintilla2-5 = %version-%release

%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.



Authors:
--------
    Riverbank Computing Limited <info@riverbankcomputing.co.uk>

%package -n libqscintilla2-5
License:        GPLv2+
Group:          Development/Libraries/C and C++
Summary:        C++ Editor Class Library
Provides:       qscintilla = 1.73
Obsoletes:      qscintilla <= 1.73

%description -n libqscintilla2-5
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.



Authors:
--------
    Riverbank Computing Limited <info@riverbankcomputing.co.uk>

%package -n libqscintilla-devel
License:        GPLv2+
Group:          Development/Libraries/C and C++
Summary:        C++ Editor Class Library Development Files
Requires:       libqscintilla2-5 = %{version}
Requires:       qt3-devel >= %( echo `rpm -q --queryformat '%{VERSION}' qt3-devel`)
Requires:       libqt4-devel >= %( echo `rpm -q --queryformat '%{VERSION}' libqt4-devel`)
# openSUSE 10.3
Provides:       qscintilla-devel = %{version}
Obsoletes:      qscintilla-devel <= %{version}

%description -n libqscintilla-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 is mainly used by eric, the Python IDE.



Authors:
--------
    Riverbank Computing Limited <info@riverbankcomputing.co.uk>

%prep
%setup -q -n QScintilla-gpl-%scintilla_version
%patch

%build
%define qt3_environment \
  export QTDIR=/usr/lib/qt3/ \
  export QTDIR_LIB=$QTDIR/%_lib \
  export PATH=$QTDIR/bin/:$PATH
pushd Qt4
qmake
make %{?jobs:-j %jobs}
popd
%qt3_environment
pushd Qt3
qmake -o Makefile qscintilla.pro
make %{?jobs:-j %jobs}
popd

%install
pushd Qt4
make INSTALL_ROOT=$RPM_BUILD_ROOT install
popd
%qt3_environment
pushd Qt3
make INSTALL_ROOT=$RPM_BUILD_ROOT install
popd

%post -n libqscintilla2-5 -p /sbin/ldconfig

%postun -n libqscintilla2-5 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libqscintilla2-5
%defattr(-,root,root)
%doc NEWS README LICENSE.GPL2 LICENSE.GPL3
/usr/lib/qt3/%_lib/libqscintilla2.so.5*
/usr/lib/qt3/translations/qscintilla_*.qm
/usr/lib/qt3/qsci
/usr/share/qt4/qsci
/usr/share/qt4/translations/qscintilla_*.qm
%_libdir/libqscintilla2.so.5*

%files -n libqscintilla-devel
%defattr(-,root,root)
%doc doc/html-Qt3
/usr/include/Qsci
/usr/lib/qt3/include/*
/usr/lib/qt3/%_lib/libqscintilla2.so
%_libdir/libqscintilla2.so

%changelog
openSUSE Build Service is sponsored by