37acd95
%global completion_path %(pkg-config --variable=completionsdir bash-completion)
37acd95
37acd95
Name:      gtatool
e694f4d
Version:   1.5.2
e694f4d
Release:   1%{?dist}
37acd95
Summary:   Commandline tool to manipulate GTAs
37acd95
Group:     Applications/Engineering
37acd95
License:   GPLv3+
37acd95
URL:       http://gta.nongnu.org/gtatool.html
37acd95
Source0:   http://download.savannah.nongnu.org/releases/gta/%{name}-%{version}.tar.xz
37acd95
37acd95
# Response to the failing ImageMagick test
37acd95
# Doesn't solve the problem
37acd95
# http://git.savannah.gnu.org/cgit/gta.git/patch/?id=8a4cba71a35fa19eb58c111d6a376e181f642ae0
37acd95
#Patch1:    %{name}-1.5.0-imagemagick-test.patch
37acd95
37acd95
BuildRequires: bash-completion
37acd95
BuildRequires: dcmtk-devel
37acd95
BuildRequires: desktop-file-utils
37acd95
BuildRequires: gdal-devel
37acd95
BuildRequires: ImageMagick-c++-devel
37acd95
BuildRequires: libgta-devel
37acd95
BuildRequires: libsndfile-devel
37acd95
BuildRequires: matio-devel
37acd95
BuildRequires: muParser-devel
37acd95
BuildRequires: netcdf-devel
37acd95
BuildRequires: netpbm-devel
37acd95
BuildRequires: OpenEXR-devel
37acd95
BuildRequires: openjpeg-devel
37acd95
%if 0%{?fedora} > 17
37acd95
BuildRequires: pcl-devel
37acd95
%endif
37acd95
BuildRequires: pkgconfig
37acd95
BuildRequires: pfstools-devel
37acd95
BuildRequires: qt4-devel
37acd95
37acd95
Requires(post): info
37acd95
Requires(preun): info
37acd95
37acd95
%description
37acd95
Gtatool is a command line tool to manipulate GTAs.
37acd95
37acd95
It provides a set of commands that manipulate GTAs on various levels:
37acd95
array element components, array dimensions, whole arrays, and streams of arrays.
37acd95
For example, you can add components to array elements, merge separate arrays
37acd95
into combined arrays in different ways, apply global transformations to array
37acd95
data, reorder the array data, and much more.
37acd95
37acd95
Additionally, gtatool can import from and export to many other file formats, see
37acd95
the sub-packages!
37acd95
37acd95
37acd95
%package gui
37acd95
Summary:        Graphical interface of %{name}
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description gui
37acd95
This sub-package contains the graphical interface of %{name}.
37acd95
37acd95
37acd95
%package dcmtk
37acd95
Summary:        Module to import/export via dcmtk
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description dcmtk
37acd95
This sub-package contains the necessary module to import and export
37acd95
medical image data in DICOM format via dcmtk.
37acd95
37acd95
37acd95
%package gdal
37acd95
Summary:        Module to import/export via gdal
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description gdal
37acd95
This sub-package contains the necessary module to import and export
37acd95
remote sensing data via the gdal library.
37acd95
37acd95
37acd95
%package hdr
37acd95
Summary:        Module to import/export high dynamic range data
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description hdr
37acd95
This sub-package contains the necessary module to import and export
37acd95
high dynamic range images or data via OpenEXR and pfstools.
37acd95
37acd95
37acd95
%package imagemagick
37acd95
Summary:        Module to import/export traditional image formats
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description imagemagick
37acd95
This sub-package contains the necessary module to import and export
37acd95
traditional image formats via imagemagick.
37acd95
37acd95
37acd95
%package matlab
37acd95
Summary:        Module to import/export matlab files
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description matlab
37acd95
This sub-package contains the necessary module to import and export
37acd95
matlab files via matio.
37acd95
37acd95
37acd95
%package netcdf
37acd95
Summary:        Module to import/export traditional netcdf files
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description netcdf
37acd95
This sub-package contains the necessary module to import and export
37acd95
netcdf files, including HDF4 and 5.
37acd95
37acd95
37acd95
%if 0%{?fedora} > 17
37acd95
%package pcd
37acd95
Summary:        Module to import/export point cloud data
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description pcd
37acd95
This sub-package contains the necessary module to import and export
37acd95
point cloud data via pcl.
37acd95
%endif
37acd95
37acd95
37acd95
%package sndfile
37acd95
Summary:        Module to import/export sound data
37acd95
Group:          Applications/Engineering
37acd95
Requires:       %{name}%{?_isa} = %{version}-%{release}
37acd95
37acd95
%description sndfile
37acd95
This sub-package contains the necessary module to import and export
37acd95
sound data via libsndfile.
37acd95
37acd95
37acd95
%prep
37acd95
%setup -q
37acd95
#%patch1 -p2 -b .~imagemagick-test
37acd95
37acd95
%build
37acd95
# Stupid way to avoid overwriting the original LDFLAGS.
37acd95
# __global_ldflags might do instead
37acd95
export LDFLAGS_ADD="-L%{_libdir}/dcmtk"
37acd95
export CFLAGS="%{optflags} -I%{_includedir}/netpbm"
37acd95
export CXXFLAGS="%{optflags} -I%{_includedir}/netpbm"
37acd95
37acd95
# 1994 ply files are bundled; rply could take over, but the API is different
37acd95
# pvm uses files from vvv; No package is currently available in Fedora
37acd95
%configure LDFLAGS="$LDFLAGS $LDFLAGS_ADD" \
37acd95
    --without-ffmpeg \
37acd95
    --without-ply \
37acd95
    --without-pvm
37acd95
37acd95
make V=1 LDFLAGS="$LDFLAGS $LDFLAGS_ADD" %{?_smp_mflags}
37acd95
37acd95
37acd95
%install
37acd95
make install DESTDIR=%{buildroot}
37acd95
37acd95
desktop-file-validate %{buildroot}/%{_datadir}/applications/gta_gui.desktop
37acd95
37acd95
# Remove info directory, created by make install
37acd95
rm -rf %{buildroot}%{_infodir}/dir
37acd95
37acd95
# Completion scripts are loaded on demand from bash-completion 1.99 on
37acd95
#TODO: Upstream
37acd95
37acd95
mkdir -p %{buildroot}%{completion_path}
37acd95
mv %{buildroot}%{_sysconfdir}/bash_completion.d/gta-completion.bash %{buildroot}%{completion_path}/gta
37acd95
37acd95
37acd95
%check
37acd95
# Imagemagick test fails randomly in F16 and 17, but succeeds in F18
37acd95
# It's connected to ImageMagick only, as it succeeds with a rebuild
37acd95
# of F18's ImageMagick in F16.
37acd95
# Reported on the gta mailing list on Feb 3 2013
37acd95
# Make them informational for the time being
37acd95
make check || exit 0
37acd95
37acd95
37acd95
%post
37acd95
/sbin/install-info %{_infodir}/gta.info* %{_infodir}/dir || :
37acd95
37acd95
%post gui
37acd95
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
37acd95
37acd95
%preun
37acd95
if [ $1 = 0 ] ; then
37acd95
  /sbin/install-info --delete %{_infodir}/gta.info* %{_infodir}/dir || :
37acd95
fi
37acd95
37acd95
%postun gui
37acd95
if [ $1 -eq 0 ] ; then
37acd95
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
37acd95
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
37acd95
fi
37acd95
37acd95
%posttrans
37acd95
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
37acd95
37acd95
37acd95
%files 
37acd95
%doc COPYING AUTHORS README
37acd95
%{_bindir}/gta
37acd95
%dir %{_libdir}/%{name}/
37acd95
%{_libdir}/%{name}/component-compute.so
37acd95
%{_libdir}/%{name}/conv-csv.so
37acd95
%{_libdir}/%{name}/conv-jpeg.so
37acd95
%{_libdir}/%{name}/conv-datraw.so
37acd95
%{_libdir}/%{name}/conv-netpbm.so
37acd95
%{_libdir}/%{name}/conv-rat.so
37acd95
%{_libdir}/%{name}/conv-raw.so
37acd95
%{_infodir}/gta.info*
37acd95
%{_mandir}/man1/gta.1*
37acd95
37acd95
%dir %{completion_path}
37acd95
%{completion_path}/gta
37acd95
37acd95
%files gui
37acd95
%{_libdir}/%{name}/gui.so
37acd95
%{_datadir}/applications/gta_gui.desktop
37acd95
%{_datadir}/icons/hicolor/*/*
37acd95
37acd95
%files dcmtk
37acd95
%{_libdir}/%{name}/conv-dcmtk.so
37acd95
37acd95
%files gdal
37acd95
%{_libdir}/%{name}/conv-gdal.so
37acd95
37acd95
%files hdr
37acd95
%{_libdir}/%{name}/conv-pfs.so
37acd95
%{_libdir}/%{name}/conv-exr.so
37acd95
37acd95
%files imagemagick
37acd95
%{_libdir}/%{name}/conv-magick.so
37acd95
37acd95
%files matlab
37acd95
%{_libdir}/%{name}/conv-mat.so
37acd95
37acd95
%files netcdf
37acd95
%{_libdir}/%{name}/conv-netcdf.so
37acd95
37acd95
%if 0%{?fedora} > 17
37acd95
%files pcd
37acd95
%{_libdir}/%{name}/conv-pcd.so
37acd95
%endif
37acd95
37acd95
%files sndfile
37acd95
%{_libdir}/%{name}/conv-sndfile.so
37acd95
37acd95
37acd95
%changelog
e694f4d
* Tue Apr 30 2013 Volker Fröhlich <volker27@gmx.at> 1.5.2-1
e694f4d
- New upstream release
e694f4d
37acd95
* Sat Mar 30 2013 Volker Fröhlich <volker27@gmx.at> 1.5.1-3
37acd95
- Remove gcc-c++ as BR
37acd95
- Disable pvm and ply, due to bundle issues
37acd95
- Put the bash completion script in the proper place for dynamical loading
37acd95
37acd95
* Wed Feb 13 2013 Volker Fröhlich <volker27@gmx.at> 1.5.1-2
37acd95
- pcd sub-package conditional for F17, due to version constraint in pcl
37acd95
37acd95
* Sun Feb 10 2013 Volker Fröhlich <volker27@gmx.at> 1.5.1-1
37acd95
- New upstream release
37acd95
- Remove now included tex info patch
37acd95
- Remove now included changes of pcl_config and desktop file
37acd95
- Own bash_completion.d for the newly introduced completion file
37acd95
37acd95
* Fri Feb  1 2013 Volker Fröhlich <volker27@gmx.at> 1.5.0-1
37acd95
- Initial package for Fedora