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