[521] | 1 | %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
| 2 | %global pyqt4_version 4.7 |
---|
| 3 | |
---|
| 4 | %define ver 1.78 |
---|
| 5 | |
---|
[1670] | 6 | %define qt4_ver 4.6.3 |
---|
[1444] | 7 | %define _qt4_prefix %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{qt4_ver}) |
---|
| 8 | %define _qt4_libdir %(pkg-config --variable libdir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/lib) |
---|
| 9 | %define _qt4_includedir %(pkg-config --variable headerdir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/include) |
---|
| 10 | %define _qt4_translationdir %(pkg-config --variable translationdir --silence-errors Qt 2>/dev/null || echo %{_datadir}/qt4/translations) |
---|
| 11 | |
---|
| 12 | %global qtdir %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{qt4_ver}) |
---|
[521] | 13 | %global qtinc %{qtdir}/include |
---|
| 14 | %global qtlib %{qtdir}/lib |
---|
| 15 | |
---|
| 16 | Summary: A Scintilla port to Qt |
---|
| 17 | Name: qscintilla |
---|
[1444] | 18 | Version: 2.4.4 |
---|
[1670] | 19 | Release: 2%{?_dist_release} |
---|
[521] | 20 | # matches up (pretty much) with qt4 |
---|
| 21 | License: GPLv3 or GPLv2 with exceptions |
---|
| 22 | Group: Development/Tools |
---|
| 23 | URL: http://www.riverbankcomputing.co.uk/qscintilla |
---|
| 24 | Source: QScintilla-gpl-%{version}.tar.gz |
---|
| 25 | # TODO: upstream this |
---|
| 26 | Patch1: QScintilla-2-gpl-Qt4-incpath.patch |
---|
| 27 | |
---|
| 28 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[1670] | 29 | BuildRequires: qt4-devel = %{qt4_ver} |
---|
[521] | 30 | BuildRequires: PyQt4-devel >= %{pyqt4_version} |
---|
| 31 | |
---|
| 32 | %description |
---|
| 33 | QScintilla is a port of Scintilla to the Qt GUI toolkit. |
---|
| 34 | |
---|
| 35 | This version of QScintilla is based on Scintilla v%{ver}. |
---|
| 36 | |
---|
| 37 | %package designer |
---|
| 38 | Summary: QScintilla designer plugin |
---|
| 39 | Group: Development/Tools |
---|
| 40 | Requires: %{name} = %{version}-%{release} |
---|
| 41 | Requires: qt4-designer |
---|
| 42 | |
---|
| 43 | %description designer |
---|
| 44 | %{summary}. |
---|
| 45 | |
---|
| 46 | %package devel |
---|
| 47 | Summary: QScintilla Development Files |
---|
| 48 | Group: Development/Libraries |
---|
| 49 | Requires: %{name} = %{version} |
---|
| 50 | Requires: qt4-devel |
---|
| 51 | |
---|
| 52 | %description devel |
---|
| 53 | This packages contains the libraries, include and other files |
---|
| 54 | you can use to develop applications with QScintilla. |
---|
| 55 | |
---|
| 56 | %package python |
---|
| 57 | Summary: QScintilla PyQt4 bindings |
---|
| 58 | Group: Development/Libraries |
---|
| 59 | Requires: %{name} = %{version}-%{release} |
---|
| 60 | Requires: PyQt4 >= %{pyqt4_version} |
---|
| 61 | |
---|
| 62 | %description python |
---|
| 63 | %{summary}. |
---|
| 64 | |
---|
| 65 | %package python-devel |
---|
| 66 | Summary: Development files for QScintilla PyQt4 bindings |
---|
| 67 | Group: Development/Libraries |
---|
| 68 | Requires: %{name}-python = %{version}-%{release} |
---|
| 69 | Requires: PyQt4-devel |
---|
| 70 | |
---|
| 71 | %description python-devel |
---|
| 72 | %{summary}. |
---|
| 73 | |
---|
| 74 | %prep |
---|
| 75 | %setup -q -n QScintilla-gpl-%{version} |
---|
| 76 | %patch1 -p1 -b .designer-incpath-qt4 |
---|
| 77 | |
---|
| 78 | # fix permissions on doc files |
---|
| 79 | find doc example-Qt4 -type f -exec chmod 0644 {} ';' |
---|
| 80 | find src include -type f -exec chmod 0644 {} ';' |
---|
| 81 | |
---|
| 82 | # fix line endings in license file(s) |
---|
| 83 | sed -i 's/\r//' LICENSE.GPL2 GPL_EXCEPTION_ADDENDUM.TXT |
---|
| 84 | |
---|
| 85 | %build |
---|
[1444] | 86 | export QTDIR=%{_qt4_prefix} |
---|
[521] | 87 | %ifarch x86_64 |
---|
| 88 | export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64/ |
---|
| 89 | %else |
---|
| 90 | export QMAKESPEC=$QTDIR/mkspecs/linux-g++/ |
---|
| 91 | %endif |
---|
| 92 | |
---|
| 93 | pushd Qt4 |
---|
| 94 | $QTDIR/bin/qmake -o Makefile qscintilla.pro |
---|
| 95 | make %{?_smp_mflags} |
---|
| 96 | popd |
---|
| 97 | |
---|
| 98 | pushd designer-Qt4 |
---|
| 99 | $QTDIR/bin/qmake -o Makefile designer.pro |
---|
| 100 | make %{?_smp_mflags} |
---|
| 101 | popd |
---|
| 102 | |
---|
| 103 | pushd Python |
---|
| 104 | %{__python} configure.py \ |
---|
| 105 | -c -j 3 \ |
---|
| 106 | -n ../Qt4 \ |
---|
| 107 | -o ../Qt4 |
---|
| 108 | make %{?_smp_mflags} |
---|
| 109 | popd |
---|
| 110 | |
---|
| 111 | %install |
---|
| 112 | rm -rf $RPM_BUILD_ROOT |
---|
| 113 | |
---|
| 114 | make install INSTALL_ROOT=$RPM_BUILD_ROOT -C Qt4 |
---|
| 115 | make install INSTALL_ROOT=$RPM_BUILD_ROOT -C designer-Qt4 |
---|
| 116 | make install DESTDIR=$RPM_BUILD_ROOT -C Python |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | %clean |
---|
| 120 | rm -rf $RPM_BUILD_ROOT |
---|
| 121 | |
---|
| 122 | %post -p /sbin/ldconfig |
---|
| 123 | |
---|
| 124 | %postun -p /sbin/ldconfig |
---|
| 125 | |
---|
| 126 | %files |
---|
| 127 | %defattr(-, root, root, 755) |
---|
[1444] | 128 | %doc NEWS README |
---|
| 129 | %doc LICENSE.GPL3 LICENSE.GPL2 GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT |
---|
| 130 | %{_qt4_libdir}/libqscintilla2.so.* |
---|
| 131 | %{_qt4_prefix}/qsci/* |
---|
| 132 | %{_qt4_translationdir}/* |
---|
[521] | 133 | |
---|
| 134 | %files designer |
---|
| 135 | %defattr(-,root,root,-) |
---|
[1444] | 136 | %{_qt4_prefix}/plugins/designer/libqscintillaplugin.so |
---|
[521] | 137 | |
---|
| 138 | %files devel |
---|
[1444] | 139 | %defattr(-, root, root, -) |
---|
| 140 | %{_qt4_includedir}/* |
---|
| 141 | %{_qt4_libdir}/libqscintilla2.so |
---|
[521] | 142 | |
---|
| 143 | %files python |
---|
| 144 | %defattr(-,root,root,-) |
---|
| 145 | %{python_sitearch}/PyQt4/Qsci.so |
---|
| 146 | |
---|
| 147 | %files python-devel |
---|
| 148 | %defattr(-,root,root,-) |
---|
| 149 | %{_datadir}/sip/PyQt4/Qsci |
---|
| 150 | |
---|
| 151 | %changelog |
---|
[1670] | 152 | * Wed Aug 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.4-2 |
---|
| 153 | - rebuild with qt4-4.6.3 |
---|
| 154 | - fix qt4_ver from 4.6.1 to 4.6.3 |
---|
| 155 | - fix BuildRequires: qt4-devel = %{qt4_ver} (add version) |
---|
| 156 | |
---|
[1444] | 157 | * Sun Jul 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1 |
---|
| 158 | - new upstream release |
---|
| 159 | - updated qt4 macros |
---|
| 160 | |
---|
[521] | 161 | * Sat Feb 06 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.2-1 |
---|
| 162 | - new upstream release |
---|
| 163 | |
---|
| 164 | * Fri Feb 05 2010 Shu KONNO <owa@bg.wakwak.com> 2.4-3 |
---|
| 165 | - rebuilt with qt4-4.6.1, python-2.6 |
---|
| 166 | - installed translation to %%{_datadir}/qt4/translations now |
---|
| 167 | |
---|
| 168 | * Thu Oct 22 2009 Shu KONNO <owa@bg.wakwak.com> 2.4-2 |
---|
| 169 | - updated macro pyqt4_version to 4.6 |
---|
| 170 | - fixed changelog year below (2008 -> 2009) |
---|
| 171 | |
---|
| 172 | * Sat Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4-1 |
---|
| 173 | - new upstream release |
---|
| 174 | - added designer, python and python-devel sub-packages |
---|
| 175 | |
---|
| 176 | * Sun Aug 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.7.1-1 |
---|
| 177 | - appiled new versioning policy |
---|
| 178 | |
---|
| 179 | * Fri Nov 30 2007 Shu KONNO <owa@bg.wakwak.com> 1.7.1-0vl2 |
---|
| 180 | - updated macro QMAKESPEC to linux-g++-64 (if x86_64) |
---|
| 181 | |
---|
| 182 | * Thu Sep 13 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.7.1-0vl1 |
---|
| 183 | - new upstream release (1.71) |
---|
| 184 | |
---|
| 185 | * Mon Jun 4 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6-0vl1 |
---|
| 186 | - new upstream release (1.65) |
---|
| 187 | - changed Group to System Environment/Libraries |
---|
| 188 | |
---|
| 189 | * Sat Jan 15 2005 Satoshi MACHINO <machino@vinelinux.org> 1.4-0vl1 |
---|
| 190 | - initial built for VineLinux |
---|
| 191 | |
---|