diff --git a/OpenEXR.spec b/OpenEXR.spec index b1a68ec..b218555 100644 --- a/OpenEXR.spec +++ b/OpenEXR.spec @@ -1,7 +1,12 @@ +%if 0%{?fedora} > 7 +# make -libs subpkg +%define libs 1 +%endif + Name: OpenEXR Version: 1.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A high dynamic-range (HDR) image file format Group: System Environment/Libraries @@ -14,13 +19,17 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: openexr < %{version}-%{release} Provides: openexr = %{version}-%{release} -# Use Libs.private -Patch2: openexr-1.6.0-pkgconfig.patch +Patch1: OpenEXR-1.6.1-pkgconfig.patch BuildRequires: ilmbase-devel BuildRequires: zlib-devel +%if 0%{?libs} Requires: %{name}-libs = %{version}-%{release} +%else +Obsoletes: %{name}-libs < %{version}-%{release} +Provides: %{name}-libs = %{version}-%{release} +%endif # until when/if openexr_viewers gets build for fedora Obsoletes: %{name}-utils < %{version}-%{release} @@ -51,12 +60,15 @@ Group: System Environment/Libraries %prep %setup -q -n openexr-%{version} -%patch2 -p1 -b .pkgconfig +%patch1 -p1 -b .pkgconfig %build %configure --disable-static +# hack to omit unused-direct-shlib-dependencies +sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool + make %{?_smp_mflags} @@ -65,6 +77,7 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +# unpackaged files rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la @@ -83,15 +96,28 @@ rm -rf rpmdocs/examples/.deps rm -rf $RPM_BUILD_ROOT +%if 0%{?libs} %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig +%else +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig +%endif %files %defattr(-,root,root,-) %{_bindir}/* +%if 0%{?libs} +%files libs +%defattr(-,root,root,-) +%endif +%doc AUTHORS ChangeLog LICENSE NEWS README +%{_libdir}/lib*.so.* + %files devel %defattr(-,root,root,-) #omit for now, they're mostly useless, and include multilib conflicts (#342781) @@ -101,13 +127,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/lib*.so %{_libdir}/pkgconfig/* -%files libs -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog LICENSE NEWS README -%{_libdir}/lib*.so.* - %changelog +* Wed Jan 09 2008 Rex Dieter 1.6.1-2 +- hack to omit unused-direct-shlib-dependencies +- conditionalize -libs (f8+) + * Mon Jan 07 2008 Rex Dieter 1.6.1-1 - openexr-1.6.1 diff --git a/openexr-1.6.0-pkgconfig.patch b/openexr-1.6.0-pkgconfig.patch deleted file mode 100644 index 0534a49..0000000 --- a/openexr-1.6.0-pkgconfig.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- openexr-1.6.0/OpenEXR.pc.in.pkgconfig 2007-03-30 12:14:05.000000000 -0500 -+++ openexr-1.6.0/OpenEXR.pc.in 2007-08-09 08:38:48.000000000 -0500 -@@ -7,5 +7,6 @@ OpenEXR_includedir=@includedir@/OpenEXR - Name: OpenEXR - Description: OpenEXR image library - Version: @OPENEXR_VERSION@ --Libs: -L${libdir} @ILMBASE_LDFLAGS@ -lIlmImf -lz @ILMBASE_LIBS@ -+Libs: -L${libdir} @ILMBASE_LDFLAGS@ -lIlmImf @ILMBASE_LIBS@ -+Libs.private: -lz - Cflags: @ILMBASE_CXXFLAGS@ -I${OpenEXR_includedir}