Fix alternatives with wxGTK

epel8
Mystro256 8 years ago
parent 263c5a5b31
commit 8b9de376d3

@ -11,7 +11,7 @@
Name: %{wxgtkname}
Version: 3.0.2
Release: 19%{?dist}
Release: 20%{?dist}
Summary: GTK port of the wxWidgets GUI library
License: wxWidgets
Group: System Environment/Libraries
@ -243,14 +243,16 @@ rm %{buildroot}%{_bindir}/wx-config
##Install new and symlink
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config
ln -s ../..%{_libexecdir}/%{name}/wx-config %{buildroot}%{_bindir}/wx-config-3.0
touch %{buildroot}%{_bindir}/wx-config
##If gtk2
%if %{gtkver} == 2
sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config
%endif
#Move wxrc to libexec and symlink (avoid conflict with wxGTK)
#Alternatives setup with wxrc
mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name}
ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0
touch %{buildroot}%{_bindir}/wxrc
# move bakefiles to avoid conflicts with 2.8.*
mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3
@ -277,6 +279,18 @@ popd
%post -n %{wxbasename} -p /sbin/ldconfig
%postun -n %{wxbasename} -p /sbin/ldconfig
%post devel
%{_sbindir}/update-alternatives --install %{_bindir}/wx-config \
wx-config %{_libexecdir}/%{name}/wx-config 3
%{_sbindir}/update-alternatives --install %{_bindir}/wxrc \
wxrc %{_libexecdir}/%{name}/wxrc 3
%postun devel
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config
%{_sbindir}/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc
fi
%files -f wxstd3.lang
%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt
%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt
@ -295,6 +309,8 @@ popd
%{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.*
%files devel
%ghost %{_bindir}/wx-config
%ghost %{_bindir}/wxrc
%{_bindir}/wxrc-3.0
%{_bindir}/wx-config-3.0
%{_includedir}/wx-3.0
@ -327,6 +343,9 @@ popd
%doc docs/doxygen/out/xml/*
%changelog
* Sun Aug 28 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 3.0.2-20
- Fix alternatives with wxGTK (#1077718)
* Mon Apr 4 2016 Tom Callaway <tcallawa@redhat.com> - 3.0.2-19
- Add patch to resolve window sizing issue with gtk 3.19+

Loading…
Cancel
Save