]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/wxPythonFull.spec.in
Patch [ 588732 ] makes wxRB_GROUP/radiobuttons working
[wxWidgets.git] / wxPython / distrib / wxPythonFull.spec.in
1 %define pref %{_prefix}
2 %define python @PYTHON@
3 %define pyver @PYVER@
4 %define debug @DEBUG@
5 %define port @PORT@
6 %define lcport @LCPORT@
7 %define tarname @TARNAME@
8 %define version @VERSION@
9 %define ver2 2.3
10 %define release 1
11 %define wxpref %{pref}/lib/wxPython
12
13 %if %{debug}
14 %define name wxPython%{port}-py%{pyver}-dbg
15 %define othername wxPython%{port}-py%{pyver}
16 %else
17 %define name wxPython%{port}-py%{pyver}
18 %define othername wxPython%{port}-py%{pyver}-dbg
19 %endif
20
21
22 #----------------------------------------------------------------
23 Summary: Cross platform GUI toolkit for Python using wx%{port}
24 Name: %{name}
25 Version: %{version}
26 Release: %{release}
27 Source0: %{tarname}-%{version}.tar.gz
28 License: wxWindows Library Licence, Version 3
29 URL: http://wxPython.org/
30 Packager: Robin Dunn <robind@alldunn.com>
31 Group: Development/Python
32 BuildRoot: %{_tmppath}/%{name}-buildroot
33 Prefix: %{pref}
34 #BuildRequires: %{python}
35
36 Provides: wxwin
37 Provides: wx%{port} = %{version}
38 Provides: wxPython = %{version}
39
40
41 # They conflict with each other, so let them replace each other
42 Obsoletes: %{othername}
43 # old wxPython packages
44 Obsoletes: wxPython
45
46
47 %description
48 wxPython is a GUI toolkit for Python that is a wrapper around the
49 wxWindows C++ GUI library. wxPython provides a large variety of
50 window types and controls, all implemented with a native look and feel
51 (and native runtime speed) on the platforms it is supported on.
52
53 This package is implemented using the %{port} port of wxWindows, and
54 includes the wx%{port} shared libs and etc.
55
56
57 %package devel
58 Summary: wxPython%{port} development files
59 Group: Development/Libraries
60 Requires: wxPython%{port} = %{version}
61
62
63 %description devel
64 This packages contains the headers and etc. for building apps or
65 Python extension modules that use the same wx%{port} shared libraries
66 that wxPython uses.
67
68 #----------------------------------------------------------------
69 %prep
70 %setup -q -n %{tarname}-%{version}
71
72
73 #----------------------------------------------------------------
74 %build
75 if [ "$SMP" != "" ]; then
76 MAKE="make -j$SMP"
77 else
78 MAKE="make"
79 fi
80
81 mkdir build
82 cd build
83
84 # Configure, trying to reduce dependencies
85 ../configure --with-%{lcport} \
86 --prefix=%{wxpref} \
87 --disable-soname \
88 --enable-rpath=%{wxpref}/lib \
89 --with-opengl \
90 %if %{debug}
91 --enable-debug \
92 %else
93 --enable-optimise \
94 %endif
95 --with-libjpeg=builtin \
96 --with-libpng=builtin \
97 --with-libtiff=builtin \
98 --with-zlib=builtin \
99
100 ## --enable-debug_flag \
101 ## --with-odbc \
102
103
104 # Build wxWindows
105 $MAKE
106
107 cd ../locale
108 make allmo
109
110
111 # ** Unfortunately we have to do a bit of installation here so wxPython
112 # can be built. Perhaps wx-config should be changed to be able to be
113 # used from the build dir, maybe with an --inplace flag... Move these
114 # three lines to %install if/when that happens.
115 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
116 cd ../build
117 make prefix=$RPM_BUILD_ROOT%{wxpref} install
118
119
120 # Now build wxPython
121 cd ../wxPython
122 %{python} setup.py \
123 IN_CVS_TREE=1 \
124 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
125 build
126
127
128 #----------------------------------------------------------------
129 %install
130 ## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
131 %find_lang wxstd
132 cd wxPython
133 %{python} setup.py \
134 IN_CVS_TREE=1 \
135 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
136 install \
137 --root=$RPM_BUILD_ROOT
138
139
140
141 #----------------------------------------------------------------
142 %clean
143 #[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
144
145
146 #----------------------------------------------------------------
147 %post
148 /sbin/ldconfig
149
150
151 #----------------------------------------------------------------
152 %postun
153 /sbin/ldconfig
154
155
156
157 #----------------------------------------------------------------
158 %files
159 %doc docs/preamble.txt
160 %doc docs/licence.txt
161 %doc docs/readme.txt
162 %doc docs/changes.txt
163 %doc wxPython/README.txt
164 %doc wxPython/CHANGES.txt
165 %defattr(-,root,root)
166 %{wxpref}/lib/libwx*
167 %{pref}/lib/python*
168 %{wxpref}/share/
169
170
171
172 %files devel
173 %defattr(-,root,root)
174 %{wxpref}/include/wx
175 %{wxpref}/lib/wx
176 %if %{debug}
177 %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
178 %else
179 %{wxpref}/bin/wx%{lcport}-%{ver2}-config
180 %endif
181 %{wxpref}/bin/wx-config
182
183
184 #----------------------------------------------------------------
185 %changelog
186
187 # end of file