]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/wxPythonFull.spec.in
Added explicit Unicode conversion to wxDir - the
[wxWidgets.git] / wxPython / distrib / wxPythonFull.spec.in
CommitLineData
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 8%define version @VERSION@
5ccc0a56 9%define ver2 2.3
357262e4 10%define release 1
5ccc0a56 11%define wxpref %{pref}/lib/wxPython
4726eec6
RD
12
13%if %{debug}
357262e4
RD
14 %define name wxPython%{port}-py%{pyver}-dbg
15 %define othername wxPython%{port}-py%{pyver}
4726eec6 16%else
357262e4
RD
17 %define name wxPython%{port}-py%{pyver}
18 %define othername wxPython%{port}-py%{pyver}-dbg
4726eec6 19%endif
4726eec6
RD
20
21
5ccc0a56
RD
22#----------------------------------------------------------------
23Summary: Cross platform GUI toolkit for Python using wx%{port}
24Name: %{name}
25Version: %{version}
26Release: %{release}
27Source0: %{tarname}-%{version}.tar.gz
28License: wxWindows Library Licence, Version 3
29URL: http://wxPython.org/
30Packager: Robin Dunn <robind@alldunn.com>
31Group: Development/Python
4726eec6 32BuildRoot: %{_tmppath}/%{name}-buildroot
5ccc0a56
RD
33Prefix: %{pref}
34#BuildRequires: %{python}
4726eec6 35
4726eec6
RD
36Provides: wxwin
37Provides: wx%{port} = %{version}
38Provides: wxPython = %{version}
39
40
357262e4
RD
41# They conflict with each other, so let them replace each other
42Obsoletes: %{othername}
5ccc0a56
RD
43# old wxPython packages
44Obsoletes: wxPython
4726eec6
RD
45
46
47%description
48wxPython is a GUI toolkit for Python that is a wrapper around the
49wxWindows C++ GUI library. wxPython provides a large variety of
50window types and controls, all implemented with a native look and feel
51(and native runtime speed) on the platforms it is supported on.
52
5ccc0a56 53This package is implemented using the %{port} port of wxWindows, and
4726eec6
RD
54includes the wx%{port} shared libs and etc.
55
56
5ccc0a56
RD
57%package devel
58Summary: wxPython%{port} development files
59Group: Development/Libraries
60Requires: wxPython%{port} = %{version}
61
62
63%description devel
64This packages contains the headers and etc. for building apps or
65Python extension modules that use the same wx%{port} shared libraries
66that wxPython uses.
67
68#----------------------------------------------------------------
4726eec6 69%prep
357262e4 70%setup -q -n %{tarname}-%{version}
4726eec6
RD
71
72
5ccc0a56 73#----------------------------------------------------------------
4726eec6
RD
74%build
75if [ "$SMP" != "" ]; then
76 MAKE="make -j$SMP"
77else
78 MAKE="make"
79fi
80
81mkdir build
82cd build
83
84# Configure, trying to reduce dependencies
5ccc0a56
RD
85../configure --with-%{lcport} \
86 --prefix=%{wxpref} \
87 --disable-soname \
73c7ae5a 88 --enable-rpath=%{wxpref}/lib \
4726eec6
RD
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
357262e4 100## --enable-debug_flag \
5ccc0a56
RD
101## --with-odbc \
102
357262e4 103
4726eec6
RD
104# Build wxWindows
105$MAKE
106
107cd ../locale
108make 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
116cd ../build
5ccc0a56 117make prefix=$RPM_BUILD_ROOT%{wxpref} install
4726eec6
RD
118
119
120# Now build wxPython
121cd ../wxPython
122%{python} setup.py \
123 IN_CVS_TREE=1 \
5ccc0a56 124 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
4726eec6
RD
125 build
126
127
5ccc0a56 128#----------------------------------------------------------------
4726eec6
RD
129%install
130## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
131%find_lang wxstd
132cd wxPython
133%{python} setup.py \
134 IN_CVS_TREE=1 \
5ccc0a56 135 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
4726eec6
RD
136 install \
137 --root=$RPM_BUILD_ROOT
138
139
140
5ccc0a56 141#----------------------------------------------------------------
4726eec6 142%clean
357262e4 143#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
4726eec6
RD
144
145
5ccc0a56 146#----------------------------------------------------------------
4726eec6
RD
147%post
148/sbin/ldconfig
149
150
5ccc0a56 151#----------------------------------------------------------------
4726eec6
RD
152%postun
153/sbin/ldconfig
154
155
156
5ccc0a56 157#----------------------------------------------------------------
4726eec6 158%files
5ccc0a56
RD
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
4726eec6 173%defattr(-,root,root)
5ccc0a56
RD
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
4726eec6
RD
182
183
5ccc0a56 184#----------------------------------------------------------------
4726eec6
RD
185%changelog
186
187# end of file