Summary(pt_BR.UTF-8): Interface gráfica em C++ para X, OpenGL e Windows
Name: fltk2
Version: 2.0.%{_snap}
-Release: 1
+Release: 0.1
License: LGPL with amendments (see COPYING)
Group: X11/Libraries
Source0: http://ftp.easysw.com/pub/fltk/snapshots/%{_name}-%{_version}.x-%{_snap}.tar.bz2
# Source0-md5: 6bcef5fd51eb3bc4dd0702f3ae6da6ba
+Patch0: %{name}-rpath.patch
+Patch1: %{name}-soname.patch
URL: http://www.fltk.org/
BuildRequires: autoconf
# don't build with cairo support if you're planning to use fltk2 with
%prep
%setup -q -n %{_name}-%{_version}.x-%{_snap}
+%patch0 -p0
+%patch1 -p0
%build
%{__sed} -i -e '/fltk2-config/s/^\t/\t$(DESTDIR)/' fluid/Makefile
%{__mv} documentation/fluid.man $RPM_BUILD_ROOT%{_mandir}/man1/fluid.1
%{__mv} documentation/fltk.man $RPM_BUILD_ROOT%{_mandir}/man3/fltk.3
+# broken so linking, the idea stolen from
+# https://bugzilla.redhat.com/show_bug.cgi?id=477683
+ln -fs libfltk2.so.2.0 $RPM_BUILD_ROOT%{_libdir}/libfltk2.so
+ln -fs libfltk2_gl.so.2.0 $RPM_BUILD_ROOT%{_libdir}/libfltk2_gl.so
+ln -fs libfltk2_glut.so.2.0 $RPM_BUILD_ROOT%{_libdir}/libfltk2_glut.so
+ln -fs libfltk2_images.so.2.0 $RPM_BUILD_ROOT%{_libdir}/libfltk2_images.so
+
%clean
rm -rf $RPM_BUILD_ROOT
%doc documentation/*.{html,gif,jpg}
%attr(755,root,root) %{_bindir}/fltk2-config
%attr(755,root,root) %{_bindir}/fluid2
-%attr(755,root,root) %{_libdir}/libfltk2.so
-%attr(755,root,root) %{_libdir}/libfltk2_gl.so
-%attr(755,root,root) %{_libdir}/libfltk2_glut.so
-%attr(755,root,root) %{_libdir}/libfltk2_images.so
+%attr(755,root,root) %ghost %{_libdir}/libfltk2.so
+%attr(755,root,root) %ghost %{_libdir}/libfltk2_gl.so
+%attr(755,root,root) %ghost %{_libdir}/libfltk2_glut.so
+%attr(755,root,root) %ghost %{_libdir}/libfltk2_images.so
%dir %{_includedir}/fltk
%dir %{_includedir}/fltk/compat
%dir %{_includedir}/fltk/compat/FL