]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/wxPythonFull.spec.in
6eaff81e0ee5d0f35870050d8b8891d96305227d
[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 --with-opengl \
89 %if %{debug}
90 --enable-debug \
91 %else
92 --enable-optimise \
93 %endif
94 --with-libjpeg=builtin \
95 --with-libpng=builtin \
96 --with-libtiff=builtin \
97 --with-zlib=builtin \
98
99 ## --enable-debug_flag \
100 ## --with-odbc \
101
102
103 # Build wxWindows
104 $MAKE
105
106 cd ../locale
107 make allmo
108
109
110 # ** Unfortunately we have to do a bit of installation here so wxPython
111 # can be built. Perhaps wx-config should be changed to be able to be
112 # used from the build dir, maybe with an --inplace flag... Move these
113 # three lines to %install if/when that happens.
114 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
115 cd ../build
116 make prefix=$RPM_BUILD_ROOT%{wxpref} install
117
118
119 # Now build wxPython
120 cd ../wxPython
121 %{python} setup.py \
122 IN_CVS_TREE=1 \
123 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
124 build
125
126
127 #----------------------------------------------------------------
128 %install
129 ## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
130 %find_lang wxstd
131 cd wxPython
132 %{python} setup.py \
133 IN_CVS_TREE=1 \
134 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
135 install \
136 --root=$RPM_BUILD_ROOT
137
138
139
140 #----------------------------------------------------------------
141 %clean
142 #[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
143
144
145 #----------------------------------------------------------------
146 %post
147 /sbin/ldconfig
148
149
150 #----------------------------------------------------------------
151 %postun
152 /sbin/ldconfig
153
154
155
156 #----------------------------------------------------------------
157 %files
158 %doc docs/preamble.txt
159 %doc docs/licence.txt
160 %doc docs/readme.txt
161 %doc docs/changes.txt
162 %doc wxPython/README.txt
163 %doc wxPython/CHANGES.txt
164 %defattr(-,root,root)
165 %{wxpref}/lib/libwx*
166 %{pref}/lib/python*
167 %{wxpref}/share/
168
169
170
171 %files devel
172 %defattr(-,root,root)
173 %{wxpref}/include/wx
174 %{wxpref}/lib/wx
175 %if %{debug}
176 %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
177 %else
178 %{wxpref}/bin/wx%{lcport}-%{ver2}-config
179 %endif
180 %{wxpref}/bin/wx-config
181
182
183 #----------------------------------------------------------------
184 %changelog
185
186 # end of file