%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define scintilla_ver 1.76
Name: qscintilla
Version: 2.3.2
Release: 1%{?dist}
Summary: A Scintilla port to Qt
# matches up (pretty much) with qt4
License: GPLv3 or GPLv2 with exceptions
Group: Development/Tools
Url: http://www.riverbankcomputing.com/software/qscintilla/
Source0: http://www.riverbankcomputing.com/static/Downloads/QScintilla2/QScintilla-gpl-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# TODO: upstream this
Patch1: QScintilla-2-gpl-Qt4-incpath.patch
BuildRequires: qt4-devel
# for -python
BuildRequires: PyQt4-devel
BuildRequires: chrpath
%description
QScintilla is a port of Scintilla to the Qt GUI toolkit.
%{?scintilla_ver:This version of QScintilla is based on Scintilla v%{scintilla_ver}.}
%package designer
Summary: QScintilla designer plugin
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: qt4-designer
%description designer
%{summary}.
%package devel
Summary: QScintilla Development Files
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt4-devel
%description devel
%{summary}.
%package python
Summary: QScintilla PyQt4 bindings
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: PyQt4
%description python
%{summary}.
%package python-devel
Summary: Development files for QScintilla PyQt4 bindings
Group: Development/Libraries
Requires: %{name}-python = %{version}-%{release}
Requires: PyQt4-devel
%description python-devel
%{summary}.
%prep
%setup -q -n QScintilla-gpl-%{version}
%patch1 -p1 -b .designer-incpath-qt4
# fixups to support RPM_BUILD_ROOT/DESTDIR
sed -i "s/^DESTDIR = \$(QTDIR)/DESTDIR = \$(INSTALL_ROOT)\$(QTDIR)/" */*.pro
# fix permissions on doc files
find doc example-Qt4 -type f -exec chmod 0644 {} ';'
find src include -type f -exec chmod 0644 {} ';'
# fix line endings in license file(s)
sed -i 's/\r//' LICENSE.GPL2 GPL_EXCEPTION_ADDENDUM.TXT
%build
pushd Qt4
sed -i 's/INSTALLS += header trans qsci/INSTALLS += header trans qsci target/g' qscintilla.pro
%{_qt4_qmake} qscintilla.pro
echo 'build: $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)' >> Makefile
make %{?_smp_mflags}
popd
pushd designer-Qt4
%{_qt4_qmake} designer.pro
echo 'build: $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)' >> Makefile
make %{?_smp_mflags}
popd
pushd Python
%{__python} configure.py \
-c -j 3 \
-n ../Qt4 \
-o ../Qt4
make %{?_smp_mflags}
popd
%install
rm -rf %{buildroot}
make -C Qt4 install INSTALL_ROOT=%{buildroot}
make -C designer-Qt4 install INSTALL_ROOT=%{buildroot}
make -C Python install DESTDIR=%{buildroot}
chrpath --list %{buildroot}%{python_sitearch}/PyQt4/Qsci.so
chrpath --delete %{buildroot}%{python_sitearch}/PyQt4/Qsci.so
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog NEWS README
%doc LICENSE.GPL3
%doc LICENSE.GPL2 GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT
%{_qt4_libdir}/libqscintilla2.so.4*
%{_qt4_translationdir}/*
%{_qt4_prefix}/qsci/
%files designer
%defattr(-,root,root,-)
%{_qt4_plugindir}/designer/libqscintillaplugin.so
%files devel
%defattr(-,root,root,-)
%doc doc/html-Qt4 doc/Scintilla example-Qt4
%{_qt4_headerdir}/Qsci/
%{_qt4_libdir}/libqscintilla2.so
%files python
%defattr(-,root,root,-)
%{python_sitearch}/PyQt4/Qsci.so
%files python-devel
%defattr(-,root,root,-)
%{_datadir}/sip/PyQt4/Qsci/
%changelog
* Mon Nov 17 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.3.2-1
- Qscintilla-gpl-2.3.2
* Mon Nov 10 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.3.1-1
- Qscintilla-gpl-2.3.1
* Mon Sep 22 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.3-1
- Qscintilla-gpl-2.3
- scintilla_ver is missing (#461777)
* Fri Jul 18 2008 Dennis Gilmore <dennis@ausil.us> - 2.2-3
- rebuild for newer PyQT4
- fix #449423 properly
* Fri Jul 18 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.2-2
- fix build (#449423)
* Mon May 05 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.2-1
- Qscintilla-gpl-2.2
- License: GPLv3 or GPLv2 with exceptions
* Thu Feb 14 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.1-4
- use %%_qt4_* macros (preparing for qt4 possibly moving %%_qt4_datadir)
- -python: fix Requires
- -python-devel: new pkg
- omit Obsoletes: PyQt-qscintilla
(leave that to PyQt, that can get the versioning right)
* Mon Jan 28 2008 Dennis Gilmore <dennis@ausil.us> - 2.1-3
- fix typo in Obsoletes: on python package
* Mon Jan 28 2008 Dennis Gilmore <dennis@ausil.us> - 2.1-2
- remove dumb require on di from qscintilla-python
* Mon Jan 28 2008 Dennis Gilmore <dennis@ausil.us> - 2.1-1
- update to 2.1 branch
* Sat Aug 25 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 1.7.1-3
- respin (BuildID)
* Sat Aug 11 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 1.7.1-2
- License: GPLv2+
* Mon Dec 11 2006 Rex Dieter <rexdieter[AT]users.sf.net> - 1.7.1-1
- QScintilla-1.71-gpl-1.7.1
* Thu Nov 09 2006 Rex Dieter <rexdieter[AT]users.sf.net> - 1.7-1
- QScintilla1-1.71-gpl-1.7 (#214192)
* Sun Sep 03 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.6-3.3
- FC6 rebuild.
- Export flags.
* Mon Feb 13 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.6-3.2
- FC5 Rebuild.
* Tue Jan 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 1.6-3.1
- Rebuild for FC5.
* Wed Sep 14 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.6-3
- Fix permissions in prep, not in install.
* Tue Sep 13 2005 Konstantin Ryabitsev <icon@linux.duke.edu> - 1.6-2
- Fix permissions on doc files to be 0644.
* Sun Sep 11 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 1.6-1
- Update to 1.65-gpl-1.6
- Use the patch from Aurelien Bompard to build sanely in buildroot
- Include docs and examples for the -devel package
* Sat Aug 27 2005 Konstantin Ryabitsev <icon@linux.duke.edu> 1.5.1-1
- Adapt for Fedora Extras
- Drop 0-Epoch
- Make specfile simpler
- Move .so to devel
* Mon Mar 09 2005 Rex Dieter 0:1.5.1-0.0.kde
- 1.5.1
* Thu Sep 16 2004 Rex Dieter <rexdieter at sf.net> 0:1.4-0.1.kde
- updated designer-incpath patch: don't require an already installed
qscintilla-devel
- BuildConflicts: qscintilla-devel != %%version
* Thu Sep 16 2004 Rex Dieter <rexdieter at sf.net> 0:1.4-0.0.kde
- 1.4
- include designer plugin
- Prereq: %%qtdir
* Fri May 28 2004 Rex Dieter <rexdieter at sf.net> 0:1.3-0.fdr.0
- 1.3
* Thu Mar 11 2004 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.6
- dynamically determine version for qt dependancy.
* Wed Mar 10 2004 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.5
- (re)build against qt-3.3.1
* Wed Dec 03 2003 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.4
- remove extraneous macros
- (re)build against qt-3.2.3
* Mon Nov 10 2003 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.3
- (re)build against qt-3.2.2
* Wed Sep 17 2003 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.2
- use Epoch's in Requires
* Tue Aug 19 2003 Rex Dieter <rexdieter at sf.net> 0:1.2-0.fdr.1
- 1.2