]> git.pld-linux.org Git - packages/gtatool.git/blob - gtatool.spec
fce38936b01d3287372bcb6bc43a5ba57138492a
[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_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:        1
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 %if "%{_rpmversion}" >= "5"
289 BuildArch:      noarch
290 %endif
291
292 %description -n bash-completion-gtatool
293 Bash completion for gtatool command.
294
295 %description -n bash-completion-gtatool -l pl.UTF-8
296 Bashowe uzupełnianie parametrów programu gtatool.
297
298 %prep
299 %setup -q
300 %patch0 -p1
301 %patch1 -p1
302 %patch2 -p1
303 %patch3 -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-openexr} \
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.076407 seconds and 2 git commands to generate.