source: projects/specs/trunk/q/qscintilla/qscintilla-vl.spec @ 1444

Revision 1444, 5.0 KB checked in by inagaki, 14 years ago (diff)

update: PyQt4, qscintilla, sip

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