File vigra.spec of Package vigra
#
# spec file for package vigra
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _shlibname libvigraimpex5
Name: vigra
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
%if 0%{?suse_version} >= 1220
BuildRequires: hdf5-devel
%endif
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
%if 0%{?suse_version} > 1220
BuildRequires: openexr-devel
%endif
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: zlib-devel
Summary: Computer vision Library
License: MIT
Group: Development/Libraries/C and C++
Version: 1.10.0
Release: 0
Source: https://github.com/ukoethe/vigra/releases/download/Version-1-10-0/vigra-1.10.0-src-with-docu.tar.gz
Url: http://ukoethe.github.io/vigra/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
VIGRA stands for "Vision with Generic Algorithms". It is a novel
computer vision library that puts its main emphasis on customizable
algorithms and data structures. By using template techniques similar to
those in the C++ Standard Template Library, you can easily adapt any
VIGRA component to the needs of your application, without giving up
execution speed.
%package -n %{_shlibname}
Summary: Computer vision Library
Group: Development/Libraries/C and C++
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n %{_shlibname}
VIGRA stands for "Vision with Generic Algorithms". It is a novel
computer vision library that puts its main emphasis on customizable
algorithms and data structures. By using template techniques similar to
those in the C++ Standard Template Library, you can easily adapt any
VIGRA component to the needs of your application, without giving up
execution speed.
%package devel
Summary: Development files for VIGRA Library
Group: Development/Libraries/C and C++
Requires: %{_shlibname} = %{version}
Requires: fftw3-devel
%if 0%{?suse_version} >= 1220
Requires: hdf5-devel
%endif
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libstdc++-devel
Requires: libtiff-devel
%if 0%{?suse_version} > 1220
Requires: openexr-devel
%endif
Requires: zlib-devel
%description devel
VIGRA stands for "Vision with Generic Algorithms". It is a novel
computer vision library that puts its main emphasis on customizable
algorithms and data structures. By using template techniques similar to
those in the C++ Standard Template Library, you can easily adapt any
VIGRA component to the needs of your application, without giving up
execution speed.
%prep
%setup -q
%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DDOCINSTALL=%{_docdir} \
-DWITH_HDF5=1 \
%if %{_lib} == "lib64"
-DLIBDIR_SUFFIX=64 \
-DLIB_SUFFIX=64 \
%endif
%if 0%{?suse_version} > 1220
-DWITH_OPENEXR=1 \
%endif
..
make %{?_smp_mflags}
%install
cd build
%makeinstall
rm -rf %{buildroot}%{_docdir}/vigranumpy
%post -n %{_shlibname} -p /sbin/ldconfig
%postun -n %{_shlibname} -p /sbin/ldconfig
%files -n %{_shlibname}
%defattr(-,root,root)
%doc README.md LICENSE.txt
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_bindir}/vigra-config
%{_libdir}/*.so
%{_includedir}/*
%dir %{_libdir}/vigra/
%{_libdir}/vigra/*.cmake
%doc %{_docdir}/%{name}
%changelog