-# Install wx-config if there isn't any
-if test ! -f %{_bindir}/wx-config ; then
- ln -sf wxbase-%{ver2}-config %{_bindir}/wx-config
-fi
+# link wx-config when you install RPM.
+ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
+# link wx-config with explicit name.
+ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
+/sbin/ldconfig
+
+%postun devel
+/sbin/ldconfig