Blob Blame History Raw
%global srcname OpenIGTLink
%global _docdir_fmt %{name}

Name:		openigtlink
Version:	2.0
Release:	1%{?dist}
Summary:	Implementation of the OpenIGTLink network communication protocol

License:	BSD
URL:		http://openigtlink.org
Source0:	https://github.com/openigtlink/OpenIGTLink/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz

# upstream bug #120
Patch0:		openigtlink-remove_broken_code.patch

BuildRequires:	gcc-c++
BuildRequires:	cmake

# bug #1427300
ExcludeArch:	ppc64

%description
OpenIGTLink is a network communication protocol specifically designed and
developed for research on image-guided and computer-assisted interventions. It
provides a standardized mechanism for communications among computers and
devices in operating rooms (OR) for a wide variety of image-guided therapy
(IGT) applications. Examples of such applications include:

- Stereotactic surgical guidance using optical position sensor and medical
  image visualization software
- Intraoperative image guidance using real-time MRI and medical image
  visualization software
- Robot-assisted interventions using robotic devices and surgical planning
  software

OpenIGTLink is a set of messaging formats and rules (protocol) used for data
exchange on a local area network (LAN). The specification of OpenIGTLink and
its reference implementation, the OpenIGTLink Library, are available free of
charge for any purpose including commercial use.


%package devel
Summary:	OpenIGTLink development files
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	cmake%{?_isa}

%description devel
Development files for the OpenIGTLink library.

%prep
%autosetup -n %{srcname}-%{version} -p1
find . -type f -executable -a \( -name '*.h' -o -name '*.cxx' \) -exec chmod a-x {} +
mkdir build


%build
pushd build

# disable gtest due to upstream bug #122
%cmake \
    -DUSE_GTEST=OFF \
    -D%{srcname}_INSTALL_LIB_DIR=%{_libdir} \
    -D%{srcname}_INSTALL_PACKAGE_DIR=%{_libdir}/cmake/%{srcname} \
    ..
%make_build

popd


%install
pushd build
%make_install
popd


%check
pushd build
ctest -VV %{?_smp_mflags}
popd


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%license LICENSE.txt
%{_libdir}/lib%{srcname}.so.*

%files devel
%doc README.md
%{_libdir}/lib%{srcname}.so
%{_libdir}/cmake/%{srcname}/
%{_includedir}/igtl/


%changelog
* Wed Feb 22 2017 Dmitry Mikhirev <mikhirev@gmail.com> 2.0-1
- Update to 2.0 release
- Fix FTBFS #1424021

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20151015gitccb2438
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

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

* Sat Nov 28 2015 Dmitry Mikhirev <mikhirev@gmail.com> 0-0.1.20151015gitccb2438
- Initial package