-%defattr (644, root, root, 755)
-%doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt
-%dir %{pref}/share/wx
-%{pref}/share/wx/*
-%attr(755, -, -) %{pref}/lib/libwx_gtk*
-
-%files devel
-%defattr (644, root, root, 755)
-%dir %{pref}/include/wx
-%{pref}/include/wx/*
-%dir %{pref}/lib/wx
-%{pref}/lib/wx/*
-%attr(755, -, -) %{pref}/bin/wx-config
+%defattr(-,root,root)
+%doc COPYING.LIB *.txt
+%dir %{_datadir}/wx
+%{_datadir}/wx/*
+%{_libdir}/libwx_%{portname}*_core*.so.*
+%{_libdir}/libwx_%{portname}*_html*.so.*
+%{_libdir}/libwx_%{portname}*_adv*.so.*
+%if !%{unicode}
+%{_libdir}/libwx_%{portname}*_dbgrid*.so.*
+%endif
+
+%files devel -f core-headers.files
+%defattr(-,root,root)
+%{_libdir}/libwx_%{portname}*_core*.so
+%{_libdir}/libwx_%{portname}*_html*.so
+%{_libdir}/libwx_%{portname}*_adv*.so
+%if !%{unicode}
+%{_libdir}/libwx_%{portname}*_dbgrid*.so
+%endif
+%{_libdir}/libwx_%{portname}*_gl*.so
+%dir %{_libdir}/wx
+%{_libdir}/wx/*
+%{_bindir}/%{wxconfigname}
+
+%files gl
+%defattr(-,root,root)
+%{_libdir}/libwx_%{portname}*_gl*.so.*
+
+%files static
+%defattr (-,root,root)
+%{_libdir}/libwx_gtk*.a
+
+%files contrib
+%defattr(-,root,root)
+%{_libdir}/libwx_%{portname}*_animate*.so.*
+%{_libdir}/libwx_%{portname}*_deprecated*.so.*
+%{_libdir}/libwx_%{portname}*_fl*.so.*
+%{_libdir}/libwx_%{portname}*_gizmos*.so.*
+%{_libdir}/libwx_%{portname}*_mmedia*.so.*
+%{_libdir}/libwx_%{portname}*_ogl*.so.*
+%{_libdir}/libwx_%{portname}*_plot*.so.*
+%{_libdir}/libwx_%{portname}*_stc*.so.*
+%{_libdir}/libwx_%{portname}*_svg*.so.*
+%{_libdir}/libwx_%{portname}*_xrc*.so.*
+
+%files contrib-devel
+%defattr(-,root,root)
+%{_bindir}/wxrc
+%dir %{_includedir}/wx/animate
+%{_includedir}/wx/animate/*
+%{_libdir}/libwx_%{portname}*_animate*.so
+
+%dir %{_includedir}/wx/deprecated
+%{_includedir}/wx/deprecated/*
+%{_libdir}/libwx_%{portname}*_deprecated*.so
+
+%dir %{_includedir}/wx/fl
+%{_includedir}/wx/fl/*
+%{_libdir}/libwx_%{portname}*_fl*.so
+
+%dir %{_includedir}/wx/gizmos
+%{_includedir}/wx/gizmos/*
+%{_libdir}/libwx_%{portname}*_gizmos*.so
+
+%dir %{_includedir}/wx/mmedia
+%{_includedir}/wx/mmedia/*
+%{_libdir}/libwx_%{portname}*_mmedia*.so
+
+%dir %{_includedir}/wx/ogl
+%{_includedir}/wx/ogl/*
+%{_libdir}/libwx_%{portname}*_ogl*.so
+
+%dir %{_includedir}/wx/plot
+%{_includedir}/wx/plot/*
+%{_libdir}/libwx_%{portname}*_plot*.so
+
+%dir %{_includedir}/wx/stc
+%{_includedir}/wx/stc/*
+%{_libdir}/libwx_%{portname}*_stc*.so
+
+%dir %{_includedir}/wx/svg
+%{_includedir}/wx/svg/*
+%{_libdir}/libwx_%{portname}*_svg*.so