]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/wxPythonFull.spec.in
fixed small memory leak
[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
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
20Summary: Cross platform GUI toolkit for Python using wx%{port}
21Name: %{name}
22Version: %{version}
23Release: %{release}
24Source0: %{tarname}-%{version}.tar.gz
25License: wxWindows Library Licence, Version 3
26url: http://wxPython.org/
27packager: Robin Dunn <robind@alldunn.com>
28Group: Development/Python
29BuildRoot: %{_tmppath}/%{name}-buildroot
30Prefix: %{pref}
31
32
4726eec6
RD
33Provides: wxwin
34Provides: wx%{port} = %{version}
35Provides: wxPython = %{version}
36
37
357262e4
RD
38# They conflict with each other, so let them replace each other
39Obsoletes: %{othername}
40# old wx and wxPython packages
41Obsoletes: wx%{port}, wxPython
42# and some funky mandrake names
43Obsoletes: wxGTK2.3, wxGTK6
4726eec6
RD
44
45
46%description
47wxPython is a GUI toolkit for Python that is a wrapper around the
48wxWindows C++ GUI library. wxPython provides a large variety of
49window types and controls, all implemented with a native look and feel
50(and native runtime speed) on the platforms it is supported on.
51
52This package is implemented using the GTK port of wxWindows, and
53includes the wx%{port} shared libs and etc.
54
55
56%prep
357262e4 57%setup -q -n %{tarname}-%{version}
4726eec6
RD
58
59
60%build
61if [ "$SMP" != "" ]; then
62 MAKE="make -j$SMP"
63else
64 MAKE="make"
65fi
66
67mkdir build
68cd 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
89cd ../locale
90make 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
98cd ../build
99make prefix=$RPM_BUILD_ROOT%{pref} install
100
101
102# Now build wxPython
103cd ../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
113cd 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