]> git.pld-linux.org Git - SPECS.git/blob - gtatool.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / gtatool.spec
1 # TODO: pmd (BR: proprietary libpmdaccess2)
2 #
3 # Conditional build:
4 %bcond_without  apidocs         # do not build and package API docs
5 %bcond_without  qt              # Qt-based GUI
6 %bcond_without  muparser        # compute component module (based on MuParser)
7 %bcond_without  dcmtk           # DCMTK conv module
8 %bcond_without  ffmpeg          # FFmpeg conv module
9 %bcond_without  gdal            # GDAL conv module
10 %bcond_without  png             # PNG conv module
11 %bcond_without  jpeg            # JPEG conv module (based on libjpeg)
12 %bcond_without  magick          # Magick conv module (based on ImageMagick's libMagick++)
13 %bcond_without  matio           # MAT conv module (MATLAB import/export, based on [lib]matio)
14 %bcond_without  netcdf          # NetCDF conv module
15 %bcond_without  netpbm          # NetPBM conv module
16 %bcond_without  openexr         # EXR conv module (based on OpenEXR)
17 %bcond_without  pcl             # PCD conv module (based on PCL's libpcl_io)
18 %bcond_without  pfs             # PFS conv module
19 %bcond_without  sndfile         # sndfile conv module
20 %bcond_without  teem            # teem (nrrd) conv module
21 #
22 Summary:        Tools to manipulate Generic Tagged Array (GTA) files
23 Summary(pl.UTF-8):      Narzędzia do obróbki plików GTA (ogólnych tablic etykietowanych)
24 Name:           gtatool
25 Version:        2.4.0
26 Release:        2
27 License:        GPL v3+
28 Group:          Applications/File
29 Source0:        https://marlam.de/gta/releases/%{name}-%{version}.tar.xz
30 # Source0-md5:  ea2ea1a0838c614ec8b7b4072c9e6ce1
31 Patch0:         %{name}-getopt.patch
32 Patch1:         %{name}-bashcomp.patch
33 Patch2:         imagemagick7.patch
34 Patch3:         pcl-1.11.patch
35 URL:            https://marlam.de/gta/
36 %{?with_magick:BuildRequires:   ImageMagick-c++-devel}
37 %{?with_openexr:BuildRequires:  OpenEXR-devel}
38 %{?with_qt:BuildRequires:       OpenGL-devel}
39 %{?with_qt:BuildRequires:       Qt5Gui-devel >= 5.5}
40 %{?with_qt:BuildRequires:       Qt5OpenGL-devel >= 5.5}
41 %{?with_qt:BuildRequires:       Qt5Widgets-devel >= 5.5}
42 BuildRequires:  autoconf >= 2.65
43 BuildRequires:  automake >= 1:1.11.1
44 %{?with_dcmtk:BuildRequires:    dcmtk-devel}
45 %{?with_apidocs:BuildRequires:  doxygen}
46 # libavformat >= 52.110.0 libavdevice libswscale
47 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel}
48 %{?with_gdal:BuildRequires:     gdal-devel}
49 %{?with_qt:BuildRequires:       glew-devel >= 1.6.0}
50 BuildRequires:  libgta-devel >= 0.9.4
51 %{?with_jpeg:BuildRequires:     libjpeg-devel}
52 %{?with_png:BuildRequires:      libpng-devel >= 1.2.0}
53 %{?with_sndfile:BuildRequires:  libsndfile-devel}
54 BuildRequires:  libstdc++-devel
55 BuildRequires:  libtool >= 2:2.2.6
56 %{?with_matio:BuildRequires:    matio-devel >= 1.5.0}
57 %{?with_muparser:BuildRequires: muparser-devel}
58 %{?with_netcdf:BuildRequires:   netcdf-devel}
59 %{?with_netpbm:BuildRequires:   netpbm-devel}
60 %{?with_pcl:BuildRequires:      pcl-devel >= 1.8}
61 %{?with_pfs:BuildRequires:      pfstools-devel >= 2.0}
62 BuildRequires:  pkgconfig
63 %{?with_qt:BuildRequires:       qt5-build >= 5.5}
64 BuildRequires:  rpmbuild(macros) >= 1.673
65 BuildRequires:  tar >= 1:1.22
66 %{?with_teem:BuildRequires:     teem-devel}
67 BuildRequires:  xz
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %description
71 Gtatool manipulates Generic Tagged Array (GTA) files.
72
73 It provides a set of commands that manipulate GTAs on various levels,
74 and it can import from and export to many other file formats.
75
76 %description -l pl.UTF-8
77 gtatool pracuje na plikach GTA (Generic Tagged Array - ogólnych
78 tablicach etykietowanych).
79
80 Pakiet zawiera zestaw poleceń obrabiających GTA na różnych poziomach,
81 potrafiących importować i eksportować do wielu innych formatów plików.
82
83 %package component-compute
84 Summary:        gtatool module to compute array element components
85 Summary(pl.UTF-8):      Moduł gtatool do obliczania składowych elementów tablicy
86 Group:          Applications/File
87 Requires:       %{name} = %{version}-%{release}
88
89 %description component-compute
90 gtatool module to compute array element components.
91
92 %description component-compute -l pl.UTF-8
93 Moduł gtatool do obliczania składowych elementów tablicy.
94
95 %package conv-dcmtk
96 Summary:        gtatool module to convert from DICOM format
97 Summary(pl.UTF-8):      Moduł gtatool do konwersji z formatu DICOM
98 Group:          Applications/File
99 Requires:       %{name} = %{version}-%{release}
100
101 %description conv-dcmtk
102 gtatool module to convert from DICOM format.
103
104 %description conv-dcmtk -l pl.UTF-8
105 Moduł gtatool do konwersji z formatu DICOM.
106
107 %package conv-exr
108 Summary:        gtatool module to convert from/to EXR format
109 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu EXR
110 Group:          Applications/File
111 Requires:       %{name} = %{version}-%{release}
112
113 %description conv-exr
114 gtatool module to convert from/to EXR format.
115
116 %description conv-exr -l pl.UTF-8
117 Moduł gtatool do konwersji z/do formatu EXR.
118
119 %package conv-ffmpeg
120 Summary:        gtatool module to convert from FFmpeg formats
121 Summary(pl.UTF-8):      Moduł gtatool do konwersji z formatów FFmpeg
122 Group:          Applications/File
123 Requires:       %{name} = %{version}-%{release}
124
125 %description conv-ffmpeg
126 gtatool module to convert from FFmpeg formats.
127
128 %description conv-ffmpeg -l pl.UTF-8
129 Moduł gtatool do konwersji z formatów FFmpeg.
130
131 %package conv-gdal
132 Summary:        gtatool module to convert from/to GDAL supported formats
133 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatów obsługiwanych przez GDAL
134 Group:          Applications/File
135 Requires:       %{name} = %{version}-%{release}
136
137 %description conv-gdal
138 gtatool module to convert from/to GDAL supported formats.
139
140 %description conv-gdal -l pl.UTF-8
141 Moduł gtatool do konwersji z/do formatów obsługiwanych przez GDAL.
142
143 %package conv-png
144 Summary:        gtatool module to convert from/to PNG format
145 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu PNG
146 Group:          Applications/File
147 Requires:       %{name} = %{version}-%{release}
148
149 %description conv-png
150 gtatool module to convert from/to PNG format.
151
152 %description conv-png -l pl.UTF-8
153 Moduł gtatool do konwersji z/do formatu PNG.
154
155 %package conv-jpeg
156 Summary:        gtatool module to convert from/to JPEG formats
157 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu JPEG
158 Group:          Applications/File
159 Requires:       %{name} = %{version}-%{release}
160
161 %description conv-jpeg
162 gtatool module to convert from/to JPEG formats.
163
164 %description conv-jpeg -l pl.UTF-8
165 Moduł gtatool do konwersji z/do formatu JPEG.
166
167 %package conv-magick
168 Summary:        gtatool module to convert from/to ImageMagick supported formats
169 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatów obsługiwanych przez ImageMagick
170 Group:          Applications/File
171 Requires:       %{name} = %{version}-%{release}
172
173 %description conv-magick
174 gtatool module to convert from/to ImageMagick supported formats.
175
176 %description conv-magick -l pl.UTF-8
177 Moduł gtatool do konwersji z/do formatów obsługiwanych przez
178 ImageMagick.
179
180 %package conv-mat
181 Summary:        gtatool module to convert from/to MAT format
182 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu MAT
183 Group:          Applications/File
184 Requires:       %{name} = %{version}-%{release}
185 Requires:       matio >= 1.5.0
186
187 %description conv-mat
188 gtatool module to convert from/to MAT (Matlab) format.
189
190 %description conv-mat -l pl.UTF-8
191 Moduł gtatool do konwersji z/do formatu MAT (z programu Matlab).
192
193 %package conv-netcdf
194 Summary:        gtatool module to convert from/to NetCDF format
195 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu NetCDF
196 Group:          Applications/File
197 Requires:       %{name} = %{version}-%{release}
198
199 %description conv-netcdf
200 gtatool module to convert from/to NetCDF format.
201
202 %description conv-netcdf -l pl.UTF-8
203 Moduł gtatool do konwersji z/do formatu NetCDF.
204
205 %package conv-netpbm
206 Summary:        gtatool module to convert from/to NetPBM supported formats
207 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatów obsługiwanych przez NetPBM
208 Group:          Applications/File
209 Requires:       %{name} = %{version}-%{release}
210
211 %description conv-netpbm
212 gtatool module to convert from/to NetPBM supported formats.
213
214 %description conv-netpbm -l pl.UTF-8
215 Moduł gtatool do konwersji z/do formatów obsługiwanych przez NetPBM.
216
217 %package conv-pcd
218 Summary:        gtatool module to convert from/to PCD format
219 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu PCD
220 Group:          Applications/File
221 Requires:       %{name} = %{version}-%{release}
222
223 %description conv-pcd
224 gtatool module to convert from/to PCD format.
225
226 %description conv-pcd -l pl.UTF-8
227 Moduł gtatool do konwersji z/do formatu PCD.
228
229 %package conv-pfs
230 Summary:        gtatool module to convert from/to PFS format
231 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu PFS
232 Group:          Applications/File
233 Requires:       %{name} = %{version}-%{release}
234
235 %description conv-pfs
236 gtatool module to convert from/to PFS format.
237
238 %description conv-pfs -l pl.UTF-8
239 Moduł gtatool do konwersji z/do formatu PFS.
240
241 %package conv-sndfile
242 Summary:        gtatool module to convert from/to libsndfile supported formats
243 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatów obsługiwanych przez libsndfile
244 Group:          Applications/File
245 Requires:       %{name} = %{version}-%{release}
246
247 %description conv-sndfile
248 gtatool module to convert from/to libsndfile supported formats.
249
250 %description conv-sndfile -l pl.UTF-8
251 Moduł gtatool do konwersji z/do formatów obsługiwanych przez
252 libsndfile.
253
254 %package conv-teem
255 Summary:        gtatool module to convert from/to Teem (NRRD) format
256 Summary(pl.UTF-8):      Moduł gtatool do konwersji z/do formatu Teem (NRRD)
257 Group:          Applications/File
258 Requires:       %{name} = %{version}-%{release}
259
260 %description conv-teem
261 gtatool module to convert from/to Teem (NRRD) format.
262
263 %description conv-teem -l pl.UTF-8
264 Moduł gtatool do konwersji z/do formatu Teem (NRRD).
265
266 %package gui
267 Summary:        Qt-based GUI module for gtatool
268 Summary(pl.UTF-8):      Moduł graficznego interfejsu użytkownika opartego na Qt dla narzędzia gtatool
269 Group:          X11/Applications
270 Requires(post,postun):  gtk-update-icon-cache
271 Requires:       %{name} = %{version}-%{release}
272 Requires:       Qt5Widgets >= 5.5
273 Requires:       hicolor-icon-theme
274
275 %description gui
276 Qt-based GUI module for gtatool.
277
278 %description gui -l pl.UTF-8
279 Moduł graficznego interfejsu użytkownika opartego na Qt dla narzędzia
280 gtatool.
281
282 %package -n bash-completion-gtatool
283 Summary:        Bash completion for gtatool command
284 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów programu gtatool
285 Group:          Applications/Shells
286 Requires:       %{name} = %{version}-%{release}
287 Requires:       bash-completion >= 2
288 BuildArch:      noarch
289
290 %description -n bash-completion-gtatool
291 Bash completion for gtatool command.
292
293 %description -n bash-completion-gtatool -l pl.UTF-8
294 Bashowe uzupełnianie parametrów programu gtatool.
295
296 %prep
297 %setup -q
298 %patch0 -p1
299 %patch1 -p1
300 %patch2 -p1
301 %patch3 -p1
302
303 %build
304 %{__libtoolize}
305 %{__aclocal} -I m4
306 %{__autoconf}
307 %{__autoheader}
308 %{__automake}
309 %if %{with netpbm}
310 export CFLAGS="%{rpmcflags} -I/usr/include/netpbm"
311 export CXXFLAGS="%{rpmcxxflags} -I/usr/include/netpbm -std=gnu++14"
312 %endif
313 %configure \
314         MOC=%{_libdir}/qt5/bin/moc \
315         BASHCOMPLETIONDIR=%{bash_compdir} \
316         --disable-silent-rules \
317         --with-bashcompletion \
318         %{!?with_dcmtk:--without-dcmtk} \
319         %{!?with_ffmpeg:--without-ffmpeg} \
320         %{!?with_gdal:--without-gdal} \
321         %{!?with_jpeg:--without-jpeg} \
322         %{!?with_png:--without-png} \
323         %{?with_magick:--with-magick-flavor=ImageMagick} \
324         %{!?with_magick:--without-magick} \
325         %{!?with_matio:--without-matio} \
326         %{!?with_muparser:--without-muparser} \
327         %{!?with_netcdf:--without-netcdf} \
328         %{!?with_netpbm:--without-netpbm} \
329         %{!?with_openexr:--without-openexr} \
330         %{!?with_pcl:--without-pcd} \
331         %{!?with_pfs:--without-pfs} \
332         %{!?with_qt:--without-qt} \
333         %{!?with_sndfile:--without-sndfile} \
334         %{!?with_teem:--without-teem}
335 %{__make}
336
337 %install
338 rm -rf $RPM_BUILD_ROOT
339
340 %{__make} install \
341         DESTDIR=$RPM_BUILD_ROOT
342
343 %clean
344 rm -rf $RPM_BUILD_ROOT
345
346 %post   -p /sbin/postshell
347 -/usr/sbin/fix-info-dir -c %{_infodir}
348
349 %postun -p /sbin/postshell
350 -/usr/sbin/fix-info-dir -c %{_infodir}
351
352 %post gui
353 %update_icon_cache hicolor
354
355 %postun gui
356 %update_icon_cache hicolor
357
358 %files
359 %defattr(644,root,root,755)
360 %doc AUTHORS ChangeLog NEWS README
361 %attr(755,root,root) %{_bindir}/gta
362 %dir %{_libdir}/gtatool
363 %attr(755,root,root) %{_libdir}/gtatool/conv-csv.so
364 %attr(755,root,root) %{_libdir}/gtatool/conv-datraw.so
365 %attr(755,root,root) %{_libdir}/gtatool/conv-ply.so
366 %attr(755,root,root) %{_libdir}/gtatool/conv-pvm.so
367 %attr(755,root,root) %{_libdir}/gtatool/conv-rat.so
368 %attr(755,root,root) %{_libdir}/gtatool/conv-raw.so
369 %{_mandir}/man1/gta.1*
370 %{_infodir}/gta.info*
371
372 %if %{with muparser}
373 %files component-compute
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_libdir}/gtatool/component-compute.so
376 %endif
377
378 %if %{with dcmtk}
379 %files conv-dcmtk
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/gtatool/conv-dcmtk.so
382 %endif
383
384 %if %{with openexr}
385 %files conv-exr
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_libdir}/gtatool/conv-exr.so
388 %endif
389
390 %if %{with ffmpeg}
391 %files conv-ffmpeg
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_libdir}/gtatool/conv-ffmpeg.so
394 %endif
395
396 %if %{with gdal}
397 %files conv-gdal
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/gtatool/conv-gdal.so
400 %endif
401
402 %if %{with png}
403 %files conv-png
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/gtatool/conv-png.so
406 %endif
407
408 %if %{with jpeg}
409 %files conv-jpeg
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/gtatool/conv-jpeg.so
412 %endif
413
414 %if %{with magick}
415 %files conv-magick
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_libdir}/gtatool/conv-magick.so
418 %endif
419
420 %if %{with matio}
421 %files conv-mat
422 %defattr(644,root,root,755)
423 %attr(755,root,root) %{_libdir}/gtatool/conv-mat.so
424 %endif
425
426 %if %{with netcdf}
427 %files conv-netcdf
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_libdir}/gtatool/conv-netcdf.so
430 %endif
431
432 %if %{with netpbm}
433 %files conv-netpbm
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/gtatool/conv-netpbm.so
436 %endif
437
438 %if %{with pcl}
439 %files conv-pcd
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/gtatool/conv-pcd.so
442 %endif
443
444 %if %{with pfs}
445 %files conv-pfs
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/gtatool/conv-pfs.so
448 %endif
449
450 %if %{with sndfile}
451 %files conv-sndfile
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/gtatool/conv-sndfile.so
454 %endif
455
456 %if %{with teem}
457 %files conv-teem
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/gtatool/conv-teem.so
460 %endif
461
462 %if %{with qt}
463 %files gui
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_libdir}/gtatool/gui.so
466 %{_desktopdir}/gta_gui.desktop
467 %{_iconsdir}/hicolor/*x*/apps/gta.png
468 %{_iconsdir}/hicolor/scalable/apps/gta.svg
469 %endif
470
471 %files -n bash-completion-gtatool
472 %defattr(644,root,root,755)
473 %{bash_compdir}/gta
This page took 0.291649 seconds and 3 git commands to generate.