Advertisement
hobbes1069

OpenImageIO.spec

Jul 6th, 2011
2,341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Name:           OpenImageIO
  2. Version:        0.10.0
  3. Release:        1%{?dist}
  4. Summary:        Library for reading and writing images
  5.  
  6. Group:          Development/Libraries
  7. License:        BSD
  8. URL:            https://sites.google.com/site/openimageio/home
  9.  
  10. Source0:        %{name}-oiio-Release-%{version}-12-g8055b0f.tar.gz
  11.  
  12. Patch0:        OpenImageIO-0.10.0-soname_fix.patch
  13.  
  14. BuildRequires:  boost-devel glew-devel qt-devel OpenEXR-devel
  15. BuildRequires:  python2-devel
  16. BuildRequires:  libpng libtiff-devel
  17. BuildRequires:  zlib-devel hdf5-devel jasper-devel
  18.  
  19.  
  20. %description
  21. OpenImageIO is a library for reading and writing images, and a bunch of related
  22. classes, utilities, and applications. Main features include:
  23. - Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
  24.   writing 2D images that is format agnostic.
  25. - Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
  26.   DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
  27.   PNM/PPM/PGM/PBM, Field3d.
  28. - An ImageCache class that transparently manages a cache so that it can access
  29.   truly vast amounts of image data.
  30. - A really nice image viewer, iv, also based on OpenImageIO classes (and so
  31.   will work with any formats for which plugins are available).
  32.  
  33. %package doc
  34. Summary:        Documentation for %{name}
  35. License:        BSD
  36. Group:          Documentation
  37. BuildArch:      noarch
  38.  
  39. %description doc
  40. HTML Documentation for package %{name}
  41.  
  42. %package devel
  43. Summary:        Documentation for %{name}
  44. License:        BSD
  45. Group:          Development/Libraries
  46. Requires:       %{name}%{?_isa} = %{version}-%{release}
  47.  
  48. %description devel
  49. Development files for package %{name}
  50.  
  51.  
  52. %prep
  53. %setup -q -n %{name}-oiio-8055b0f
  54. %patch0 -p1
  55.  
  56.  
  57. %build
  58. mkdir -p build
  59. pushd build
  60. %cmake -DCMAKE_SKIP_RPATH:BOOL=TRUE \
  61.        ../src
  62.  
  63. make %{?_smp_mflags}
  64.  
  65.  
  66. %install
  67. pushd build
  68. make DESTDIR=%{buildroot} install
  69. popd
  70.  
  71. # Remove these files as the %doc macro will take care of them
  72. rm -f %{buildroot}%{_usr}/CHANGES \
  73.       %{buildroot}%{_usr}/INSTALL \
  74.       %{buildroot}%{_usr}/LICENSE
  75.  
  76. # Install libraries to the correct directory
  77. mkdir -p %{buildroot}%{python_sitearch}
  78. mv %{buildroot}%{_usr}/python/* %{buildroot}%{python_sitearch}
  79. rmdir %{buildroot}%{_usr}/python
  80.  
  81. %ifarch x86_64
  82. mv %{buildroot}%{_usr}/lib/* %{buildroot}%{_usr}/lib64
  83. %endif
  84.  
  85. # Move documentation so it will go in the right directory
  86. rm -rf $(pwd)/_tmpdoc && mkdir $(pwd)/_tmpdoc
  87. mv -f %{buildroot}%{_usr}/doc/* $(pwd)/_tmpdoc/
  88.  
  89.  
  90. %files
  91. %defattr(-,root,root,-)
  92. %doc CHANGES INSTALL LICENSE
  93. %{_bindir}/*
  94. %{_libdir}/libOpenImageIO.so.*
  95. %{python_sitearch}/OpenImageIO.so
  96.  
  97. %files doc
  98. %defattr(-,root,root,-)
  99. %doc _tmpdoc/*
  100.  
  101. %files devel
  102. %defattr(-,root,root,-)
  103. %{_libdir}/libOpenImageIO.so
  104. %{_includedir}/*
  105.  
  106. %changelog
  107. * Tue Jul 05 2011 Richard Shaw <hobbes1069@gmail.com> - 0.10.0-1
  108. - Inital build.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement