-Group: X11/Libraries
-Source: wxGTK-%{ver}.tar.bz2
-URL: http://www.wxwindows.org
-Packager: Vadim Zeitlin <vadim@wxwindows.org>
-Prefix: %{pref}
-BuildRoot: /var/tmp/%{name}-root
-
-# all packages providing an implementation of wxWindows library (regardless of
+Group: System/Libraries
+Source: wxWidgets-%{ver}.tar.bz2
+URL: http://www.wxwidgets.org
+Prefix: %{_prefix}
+BuildRoot: %{_tmppath}/%{name}-root
+Requires: %{wxbasename} = %{ver}
+%if %{portname} == gtk2
+BuildRequires: gtk2-devel
+%else
+BuildRequires: gtk+-devel >= 1.2.0
+%endif
+
+BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel
+# on RedHat 5 default GCC 4.1.2 crashes during compilation
+%if 0%{?rhel} == 5
+BuildRequires: gcc44-c++
+%else
+BuildRequires: gcc-c++
+%endif
+
+%if 0%{?suse_version}
+BuildRequires: libexpat-devel, Mesa-devel, xorg-x11-libSM-devel
+BuildRequires: gstreamer-0_10-devel, gstreamer-0_10-plugins-base-devel
+%else
+%if 0%{?mandriva_version}
+BuildRequires: libexpat-devel, libmesaglu-devel, libsm-devel
+# For now disabling mediactrl
+# FIXME: How to resolve OBS Mandriva dependecies for these?
+#BuildRequires: libgstreamer-devel, libgstreamer-plugins-base-devel
+%else
+BuildRequires: expat-devel, libGLU-devel, libSM-devel
+BuildRequires: gstreamer-devel, gstreamer-plugins-base-devel
+%endif
+%endif
+
+# all packages providing an implementation of wxWidgets library (regardless of