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