]>
Commit | Line | Data |
---|---|---|
357262e4 RD |
1 | %define pref %{_prefix} |
2 | %define python @PYTHON@ | |
3 | %define pyver @PYVER@ | |
4 | %define debug @DEBUG@ | |
5 | %define port @PORT@ | |
6 | %define lcport @LCPORT@ | |
4726eec6 | 7 | %define tarname @TARNAME@ |
357262e4 RD |
8 | %define version @VERSION@ |
9 | %define release 1 | |
4726eec6 RD |
10 | |
11 | %if %{debug} | |
357262e4 RD |
12 | %define name wxPython%{port}-py%{pyver}-dbg |
13 | %define othername wxPython%{port}-py%{pyver} | |
4726eec6 | 14 | %else |
357262e4 RD |
15 | %define name wxPython%{port}-py%{pyver} |
16 | %define othername wxPython%{port}-py%{pyver}-dbg | |
4726eec6 | 17 | %endif |
4726eec6 RD |
18 | |
19 | ||
20 | Summary: Cross platform GUI toolkit for Python using wx%{port} | |
21 | Name: %{name} | |
22 | Version: %{version} | |
23 | Release: %{release} | |
24 | Source0: %{tarname}-%{version}.tar.gz | |
25 | License: wxWindows Library Licence, Version 3 | |
26 | url: http://wxPython.org/ | |
27 | packager: Robin Dunn <robind@alldunn.com> | |
28 | Group: Development/Python | |
29 | BuildRoot: %{_tmppath}/%{name}-buildroot | |
30 | Prefix: %{pref} | |
31 | ||
32 | ||
4726eec6 RD |
33 | Provides: wxwin |
34 | Provides: wx%{port} = %{version} | |
35 | Provides: wxPython = %{version} | |
36 | ||
37 | ||
357262e4 RD |
38 | # They conflict with each other, so let them replace each other |
39 | Obsoletes: %{othername} | |
40 | # old wx and wxPython packages | |
41 | Obsoletes: wx%{port}, wxPython | |
42 | # and some funky mandrake names | |
43 | Obsoletes: wxGTK2.3, wxGTK6 | |
4726eec6 RD |
44 | |
45 | ||
46 | %description | |
47 | wxPython is a GUI toolkit for Python that is a wrapper around the | |
48 | wxWindows C++ GUI library. wxPython provides a large variety of | |
49 | window types and controls, all implemented with a native look and feel | |
50 | (and native runtime speed) on the platforms it is supported on. | |
51 | ||
52 | This package is implemented using the GTK port of wxWindows, and | |
53 | includes the wx%{port} shared libs and etc. | |
54 | ||
55 | ||
56 | %prep | |
357262e4 | 57 | %setup -q -n %{tarname}-%{version} |
4726eec6 RD |
58 | |
59 | ||
60 | %build | |
61 | if [ "$SMP" != "" ]; then | |
62 | MAKE="make -j$SMP" | |
63 | else | |
64 | MAKE="make" | |
65 | fi | |
66 | ||
67 | mkdir build | |
68 | cd build | |
69 | ||
70 | # Configure, trying to reduce dependencies | |
71 | ../configure --with-%{lcport} --enable-soname --prefix=%{pref} \ | |
72 | --with-odbc \ | |
73 | --with-opengl \ | |
74 | %if %{debug} | |
75 | --enable-debug \ | |
76 | %else | |
77 | --enable-optimise \ | |
78 | %endif | |
79 | --with-libjpeg=builtin \ | |
80 | --with-libpng=builtin \ | |
81 | --with-libtiff=builtin \ | |
82 | --with-zlib=builtin \ | |
83 | ||
357262e4 RD |
84 | ## --enable-debug_flag \ |
85 | ||
4726eec6 RD |
86 | # Build wxWindows |
87 | $MAKE | |
88 | ||
89 | cd ../locale | |
90 | make allmo | |
91 | ||
92 | ||
93 | # ** Unfortunately we have to do a bit of installation here so wxPython | |
94 | # can be built. Perhaps wx-config should be changed to be able to be | |
95 | # used from the build dir, maybe with an --inplace flag... Move these | |
96 | # three lines to %install if/when that happens. | |
97 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | |
98 | cd ../build | |
99 | make prefix=$RPM_BUILD_ROOT%{pref} install | |
100 | ||
101 | ||
102 | # Now build wxPython | |
103 | cd ../wxPython | |
104 | %{python} setup.py \ | |
105 | IN_CVS_TREE=1 \ | |
106 | WX_CONFIG="$RPM_BUILD_ROOT%{pref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{pref}" \ | |
107 | build | |
108 | ||
109 | ||
110 | %install | |
111 | ## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | |
112 | %find_lang wxstd | |
113 | cd wxPython | |
114 | %{python} setup.py \ | |
115 | IN_CVS_TREE=1 \ | |
116 | WX_CONFIG="$RPM_BUILD_ROOT%{pref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{pref}" \ | |
117 | install \ | |
118 | --root=$RPM_BUILD_ROOT | |
119 | ||
120 | ||
121 | ||
122 | %clean | |
357262e4 | 123 | #[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
4726eec6 RD |
124 | |
125 | ||
126 | %post | |
127 | /sbin/ldconfig | |
128 | ||
129 | ||
130 | %postun | |
131 | /sbin/ldconfig | |
132 | ||
133 | ||
134 | ||
135 | %files | |
136 | %defattr(-,root,root) | |
137 | %{_libdir}/libwx* | |
138 | %{_libdir}/python* | |
139 | %{_datadir} | |
140 | ||
141 | ||
142 | %changelog | |
143 | ||
144 | # end of file |