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