-%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
+%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_core-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_html-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_media-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.*
+%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.*
+
+%files -n wx-i18n
+%defattr(-,root,root)
+%{_datadir}/locale/*/LC_MESSAGES/*.mo
+
+%files devel -f core-headers.files
+%defattr(-,root,root)
+# shared libs
+%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_core-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_html-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_media-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
+%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
+# static libs
+%{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_aui-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_core-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_html-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_media-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_stc-%{ver2}.a
+%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
+%dir %{_libdir}/wx
+%{_libdir}/wx/config/%{wxconfig}
+%{_libdir}/wx/include/%{wxconfig}/wx/setup.h
+%{_libdir}/wx/config/%{wxconfigstatic}
+%{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h
+%{_bindir}/wxrc*
+
+%files -n %{wxbasename}
+%defattr(-,root,root)
+%{_libdir}/libwx_base*-%{ver2}.so.*
+
+%files -n %{wxbasename}-devel -f wxbase-headers.paths
+%defattr (-,root,root)
+%dir %{_includedir}/wx-%{ver2}
+%{_libdir}/libwx_base*-%{ver2}.so
+%{_libdir}/libwx_base*-%{ver2}.a
+%if %{unicode}
+ %{_libdir}/libwxregexu-%{ver2}.a
+%endif
+%{_libdir}/libwxscintilla-%{ver2}.a
+%dir %{_libdir}/wx
+%{_datadir}/aclocal/*.m4
+%{_datadir}/bakefile/presets/*