Blob Blame History Raw
%global upver 2-3-00

Name:           libminc
Version:        2.3.00
Release:        12%{?dist}
Summary:        Core library and API of the MINC toolkit

License:        MIT
URL:            https://github.com/BIC-MNI/libminc
Source0:        https://github.com/BIC-MNI/libminc/archive/%{name}-%{upver}/%{name}-%{version}.tar.gz
Patch0:         0001-install-cmake-files-in-private-directory.patch
# https://github.com/BIC-MNI/libminc/issues/63
Patch1:         0002-rename-hdf_close-to-hdf_fclose-due-to-first-exposed-.patch
# https://github.com/BIC-MNI/libminc/commit/166aca9f4c33bc5642047ceafd5c6bae0d888187
Patch2:         0001-Fix-endian-issues-with-label-data.patch
BuildRequires:  git-core
BuildRequires:  cmake
BuildRequires:  gcc gcc-c++
BuildRequires:  zlib-devel
BuildRequires:  netcdf-devel
BuildRequires:  hdf5-devel

%description
The MINC file format is a highly flexible medical image file format
built on the HDF5 generalized data format. The format is
simple, self-describing, extensible, portable and N-dimensional, with
programming interfaces for both low-level data access and high-level
volume manipulation. On top of the libraries is a suite of generic
image-file manipulation tools. The format, libraries and tools are
designed for use in a medical-imaging research environment : they are
simple and powerful and make no attempt to provide a pretty interface
to users.

%package devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       netcdf-devel%{?_isa}
Requires:       zlib-devel%{?_isa}
Requires:       hdf5-devel%{?_isa}
Requires:       cmake%{?_isa}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -n %{name}-%{name}-%{upver} -S git
rm -rf build/
mkdir -p build/
sed -i -e '/SET (LIBMINC_INSTALL_INCLUDE_DIR/s/include/include\/%{name}/' CMakeLists.txt

%build
pushd build/
  %cmake ../ \
    -DLIBMINC_BUILD_SHARED_LIBS=ON \
    -DLIBMINC_MINC1_SUPPORT=ON \
    -DLIBMINC_BUILD_EZMINC=ON
  %make_build
popd

%install
pushd build/
  %make_install
popd

%check
pushd build/
  ctest -VV
popd

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%license COPYING
%doc README README.release doc/ NEWS ChangeLog AUTHORS
%{_libdir}/%{name}*.so.*

%files devel
%doc volume_io/example/*.c ezminc/examples/*.cpp ezminc/examples/Example_CMakeLists.txt
%{_includedir}/%{name}/
%{_libdir}/cmake/LIBMINC/
%{_libdir}/%{name}*.so

%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.00-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Dec 06 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.00-6
- Rebuild for hdf5 1.8.18

* Wed Jun 29 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.00-5
- Rebuild for hdf5 1.8.17

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.00-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 22 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.00-3
- Rebuild for netcdf 4.4.0

* Wed Dec 02 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.3.00-2
- Apply patch to fix endian tests (RHBZ #1287015)

* Sat Nov 07 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.3.00-1
- Initial package