| 1 |
# nVidia Cg toolkit is not free
|
| 2 |
%define with_Cg 0
|
| 3 |
%if %with_Cg
|
| 4 |
%define real_name OpenEXR_Viewers-nonfree
|
| 5 |
%define V_suffix -nonfree
|
| 6 |
%define priority 10
|
| 7 |
%else
|
| 8 |
%define real_name OpenEXR_Viewers
|
| 9 |
%define V_suffix -fedora
|
| 10 |
%define priority 5
|
| 11 |
%endif
|
| 12 |
|
| 13 |
Name: %{real_name}
|
| 14 |
Version: 1.0.1
|
| 15 |
Release: 7%{?dist}
|
| 16 |
Summary: Viewers programs for OpenEXR
|
| 17 |
|
| 18 |
Group: Applications/Multimedia
|
| 19 |
License: AMPAS BSD
|
| 20 |
URL: http://www.openexr.com
|
| 21 |
Source0: http://download.savannah.nongnu.org/releases/openexr/openexr_viewers-%{version}.tar.gz
|
| 22 |
Patch0: openexr_viewers-1.0.1-gcc43.patch
|
| 23 |
Patch1: openexr_viewers-1.0.1-gcc44.patch
|
| 24 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
| 25 |
|
| 26 |
BuildRequires: OpenEXR_CTL-devel
|
| 27 |
BuildRequires: OpenEXR_CTL
|
| 28 |
BuildRequires: fltk-devel
|
| 29 |
%if %with_Cg
|
| 30 |
BuildRequires: Cg
|
| 31 |
BuildRequires: freeglut-devel
|
| 32 |
Provides: OpenEXR_Viewers = %{version}
|
| 33 |
%else
|
| 34 |
BuildConflicts: Cg
|
| 35 |
%endif
|
| 36 |
# Last version was in F-7 - Can be dropped in F-10
|
| 37 |
Obsoletes: OpenEXR-utils < 1.6.0
|
| 38 |
|
| 39 |
Requires: OpenEXR_CTL
|
| 40 |
Requires(post): /usr/sbin/alternatives
|
| 41 |
Requires(preun): /usr/sbin/alternatives
|
| 42 |
|
| 43 |
|
| 44 |
%description
|
| 45 |
exrdisplay is a simple still image viewer that optionally applies color
|
| 46 |
transforms to OpenEXR images, using ctl as explained in this document:
|
| 47 |
doc/OpenEXRViewers.pdf
|
| 48 |
|
| 49 |
%if %with_Cg
|
| 50 |
playexr is a program that plays back OpenEXR image sequences, optionally
|
| 51 |
with CTL support, applying rendering and display transforms in line with
|
| 52 |
the current discussions at the AMPAS Image Interchange Framework committee
|
| 53 |
(September 2006).
|
| 54 |
|
| 55 |
This is the nonfree version compiled with nVidia Cg support
|
| 56 |
See: http://developer.nvidia.com/object/cg_toolkit.html
|
| 57 |
%else
|
| 58 |
|
| 59 |
%package docs
|
| 60 |
Summary: Documentation for %{name}
|
| 61 |
Group: Documentation
|
| 62 |
|
| 63 |
%description docs
|
| 64 |
This package contains documentation files for %{name}.
|
| 65 |
%endif
|
| 66 |
|
| 67 |
%prep
|
| 68 |
%setup -q -n openexr_viewers-%{version}
|
| 69 |
%patch0 -p1 -b .gcc43
|
| 70 |
%patch1 -p1 -b .gcc44
|
| 71 |
|
| 72 |
|
| 73 |
%build
|
| 74 |
export CXXFLAGS="$RPM_OPT_FLAGS -L%{_libdir}"
|
| 75 |
%configure --disable-static \
|
| 76 |
%if %with_Cg
|
| 77 |
--with-cg-prefix=%{_prefix}
|
| 78 |
%endif
|
| 79 |
|
| 80 |
# Missing libs for playexr
|
| 81 |
sed -i -e 's|LIBS =|LIBS = -lglut|' playexr/Makefile
|
| 82 |
|
| 83 |
make %{?_smp_mflags}
|
| 84 |
|
| 85 |
|
| 86 |
%install
|
| 87 |
rm -rf $RPM_BUILD_ROOT
|
| 88 |
make install DESTDIR=$RPM_BUILD_ROOT
|
| 89 |
|
| 90 |
# Remove the config.h - uneeded afaik
|
| 91 |
rm -rf $RPM_BUILD_ROOT%{_includedir}
|
| 92 |
|
| 93 |
# move the binary
|
| 94 |
mv $RPM_BUILD_ROOT%{_bindir}/exrdisplay $RPM_BUILD_ROOT%{_bindir}/exrdisplay%{V_suffix}
|
| 95 |
|
| 96 |
# Removing installed docs
|
| 97 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
|
| 98 |
|
| 99 |
# Owernship of the alternative provides
|
| 100 |
touch $RPM_BUILD_ROOT%{_bindir}/exrdisplay
|
| 101 |
|
| 102 |
%clean
|
| 103 |
rm -rf $RPM_BUILD_ROOT
|
| 104 |
|
| 105 |
%post
|
| 106 |
alternatives --install %{_bindir}/exrdisplay exrdisplay %{_bindir}/exrdisplay%{V_suffix} %{priority} ||:
|
| 107 |
|
| 108 |
|
| 109 |
%preun
|
| 110 |
if [ $1 -eq 0 ]; then
|
| 111 |
alternatives --remove exrdisplay %{_bindir}/exrdisplay%{V_suffix} || :
|
| 112 |
fi
|
| 113 |
|
| 114 |
%files
|
| 115 |
%defattr(-,root,root,-)
|
| 116 |
%doc AUTHORS ChangeLog COPYING NEWS README
|
| 117 |
%ghost %{_bindir}/exrdisplay
|
| 118 |
%{_bindir}/exrdisplay%{V_suffix}
|
| 119 |
%if %with_Cg
|
| 120 |
%{_bindir}/playexr
|
| 121 |
%else
|
| 122 |
|
| 123 |
%files docs
|
| 124 |
%defattr(-,root,root,-)
|
| 125 |
%doc doc/OpenEXRViewers.odt doc/OpenEXRViewers.pdf
|
| 126 |
%endif
|
| 127 |
|
| 128 |
%changelog
|
| 129 |
* Tue Oct 20 2009 kwizart < kwizart at gmail.com > - 1.0.1-7
|
| 130 |
- Rebuild for F-12
|
| 131 |
|
| 132 |
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-6
|
| 133 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
| 134 |
|
| 135 |
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
|
| 136 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
| 137 |
|
| 138 |
* Thu Feb 12 2009 kwizart < kwizart at gmail.com > - 1.0.1-4
|
| 139 |
- Rebuild for gcc44
|
| 140 |
|
| 141 |
* Fri Oct 17 2008 kwizart < kwizart at gmail.com > - 1.0.1-3
|
| 142 |
- Rebuild for F-10
|
| 143 |
|
| 144 |
* Sat May 10 2008 kwizart < kwizart at gmail.com > - 1.0.1-2
|
| 145 |
- Ghost the alternative provides
|
| 146 |
- Obsoletes OpenEXR-utils
|
| 147 |
|
| 148 |
* Wed Jan 9 2008 kwizart < kwizart at gmail.com > - 1.0.1-1
|
| 149 |
- Initial package for Fedora
|
| 150 |
|