]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - jpeghdr (libjpeghdr doesn't seem to be freely available; was attached to some book?); not supported by CMakeLists | |
3 | # - split progs package by libraries required | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_with opencv # pfsalign utility (using OpenCV) | |
7 | ||
8 | Summary: pfstools for High Dynamic Range Images and Video | |
9 | Summary(pl.UTF-8): Narzędzia do obrazów i wideo o dużym zakresie luminancji | |
10 | Name: pfstools | |
11 | Version: 2.2.0 | |
12 | Release: 5 | |
13 | License: LGPL v2.1+ | |
14 | Group: Libraries | |
15 | Source0: http://downloads.sourceforge.net/pfstools/%{name}-%{version}.tgz | |
16 | # Source0-md5: 8f026213e567bc72dd23253ced5417a4 | |
17 | Patch0: imagemagick7.patch | |
18 | Patch1: %{name}-glut.patch | |
19 | URL: http://pfstools.sourceforge.net/ | |
20 | BuildRequires: ImageMagick-c++-devel >= 6.0 | |
21 | BuildRequires: OpenEXR-devel >= 1.0 | |
22 | BuildRequires: OpenGL-GLU-devel | |
23 | BuildRequires: OpenGL-glut-devel | |
24 | BuildRequires: Qt5Widgets-devel >= 5 | |
25 | BuildRequires: cmake >= 2.8.8 | |
26 | BuildRequires: fftw3-devel >= 3 | |
27 | BuildRequires: fftw3-single-devel >= 3 | |
28 | # pfsingdal not supported in CMakeLists | |
29 | #BuildRequires: gdal-devel | |
30 | BuildRequires: gsl-devel | |
31 | BuildRequires: libexif-devel | |
32 | BuildRequires: libgomp-devel | |
33 | BuildRequires: libstdc++-devel >= 6:4.7 | |
34 | BuildRequires: libtiff-devel | |
35 | BuildRequires: netpbm-devel | |
36 | BuildRequires: octave-devel | |
37 | %{?with_opencv:BuildRequires: opencv-devel} | |
38 | BuildRequires: perl-base | |
39 | BuildRequires: pkgconfig | |
40 | BuildRequires: qt5-build >= 5 | |
41 | BuildRequires: texlive-format-pdflatex | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %define octave_m_dir %(octave-config --m-site-dir) | |
45 | %define octave_oct_dir %(octave-config --oct-site-dir) | |
46 | ||
47 | %description | |
48 | pfstools package is a set of command line (and one GUI) programs for | |
49 | reading, writing, manipulating and viewing high-dynamic range (HDR) | |
50 | images and video frames. All programs in the package exchange data | |
51 | using Unix pipes and a simple generic HDR image format (pfs). The | |
52 | concept of the pfstools is similar to netpbm package for low-dynamic | |
53 | range images. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | Pakiet pfstools jest zestawiem programów służących do odczytu, | |
57 | zapisu, obróbki i wyświetlania obrazów i klatek wideo o wysokim | |
58 | zakresie dynamiki (HDR). Wszystkie programy wymieniają dane za | |
59 | pomocą uniksowych rurek i prostego ogólnego formatu obrazów HDR | |
60 | (pfs). Idea pfstools jest podobna do pakietu netpbm, używanego do | |
61 | obrazów o niskim zakresie dynamiki. | |
62 | ||
63 | %package devel | |
64 | Summary: Header files for pfstools | |
65 | Summary(pl.UTF-8): Pliki nagłówkowe pfstools | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | Obsoletes: pfstools-static < 2 | |
69 | ||
70 | %description devel | |
71 | The header files are only needed for development of programs using the | |
72 | pfstools. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | W pakiecie tym znajdują się pliki nagłówkowe, przeznaczone dla | |
76 | programistów używających bibliotek pfstools. | |
77 | ||
78 | %package progs | |
79 | Summary: pfstools utility programs | |
80 | Summary(pl.UTF-8): Narzędzia pfstools | |
81 | Group: Applications/Graphics | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Obsoletes: pfscalibration < 2 | |
84 | Obsoletes: pfstmo < 2 | |
85 | ||
86 | %description progs | |
87 | This package contains pfstools utility programs. | |
88 | ||
89 | %description progs -l pl.UTF-8 | |
90 | Pakiet zawiera narzędzia pfstools. | |
91 | ||
92 | %package -n octave-pfstools | |
93 | Summary: Octave bindings for pfstools | |
94 | Summary(pl.UTF-8): Wiązania języka Octave do pfstools | |
95 | Group: Development/Languages | |
96 | Requires: %{name} = %{version}-%{release} | |
97 | ||
98 | %description -n octave-pfstools | |
99 | Octave bindings for pfstools. | |
100 | ||
101 | %description -n octave-pfstools -l pl.UTF-8 | |
102 | Wiązania języka Octave do pfstools. | |
103 | ||
104 | %prep | |
105 | %setup -q | |
106 | %patch0 -p1 | |
107 | %patch1 -p1 | |
108 | ||
109 | %build | |
110 | install -d build | |
111 | cd build | |
112 | export CXXFLAGS="%{rpmcxxflags} -std=c++11" | |
113 | %cmake .. \ | |
114 | %{!?with_opencv:-DWITH_OpenCV=OFF} | |
115 | ||
116 | %{__make} | |
117 | ||
118 | cd ../doc | |
119 | pdflatex pfs_format_spec.tex | |
120 | ||
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %{__make} -C build install \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
127 | %clean | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %post -p /sbin/ldconfig | |
131 | %postun -p /sbin/ldconfig | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
135 | %doc AUTHORS ChangeLog README doc/faq.txt doc/pfs_format_spec.pdf | |
136 | %attr(755,root,root) %{_libdir}/libpfs.so.*.*.* | |
137 | %attr(755,root,root) %ghost %{_libdir}/libpfs.so.2 | |
138 | ||
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
141 | %attr(755,root,root) %{_libdir}/libpfs.so | |
142 | %{_pkgconfigdir}/pfs.pc | |
143 | %{_includedir}/pfs | |
144 | ||
145 | %files progs | |
146 | %defattr(644,root,root,755) | |
147 | %attr(755,root,root) %{_bindir}/pfs* | |
148 | %attr(755,root,root) %{_bindir}/*2hdrgen | |
149 | %{_datadir}/pfstools | |
150 | %{_mandir}/man1/pfs*.1* | |
151 | %{_mandir}/man1/*2hdrgen.1* | |
152 | ||
153 | %files -n octave-pfstools | |
154 | %defattr(644,root,root,755) | |
155 | %dir %{octave_oct_dir}/pfstools | |
156 | %attr(755,root,root) %{octave_oct_dir}/pfstools/pfs*.oct | |
157 | %{octave_m_dir}/pfstools |