]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/wxPythonFull.spec.in
Changes to attempt to use a private wxGTK
[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 \
4726eec6
RD
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
357262e4 99## --enable-debug_flag \
5ccc0a56
RD
100## --with-odbc \
101
357262e4 102
4726eec6
RD
103# Build wxWindows
104$MAKE
105
106cd ../locale
107make 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
115cd ../build
5ccc0a56 116make prefix=$RPM_BUILD_ROOT%{wxpref} install
4726eec6
RD
117
118
119# Now build wxPython
120cd ../wxPython
121%{python} setup.py \
122 IN_CVS_TREE=1 \
5ccc0a56 123 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
4726eec6
RD
124 build
125
126
5ccc0a56 127#----------------------------------------------------------------
4726eec6
RD
128%install
129## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
130%find_lang wxstd
131cd wxPython
132%{python} setup.py \
133 IN_CVS_TREE=1 \
5ccc0a56 134 WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
4726eec6
RD
135 install \
136 --root=$RPM_BUILD_ROOT
137
138
139
5ccc0a56 140#----------------------------------------------------------------
4726eec6 141%clean
357262e4 142#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
4726eec6
RD
143
144
5ccc0a56 145#----------------------------------------------------------------
4726eec6
RD
146%post
147/sbin/ldconfig
148
149
5ccc0a56 150#----------------------------------------------------------------
4726eec6
RD
151%postun
152/sbin/ldconfig
153
154
155
5ccc0a56 156#----------------------------------------------------------------
4726eec6 157%files
5ccc0a56
RD
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
4726eec6 172%defattr(-,root,root)
5ccc0a56
RD
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
4726eec6
RD
181
182
5ccc0a56 183#----------------------------------------------------------------
4726eec6
RD
184%changelog
185
186# end of file