File dlib.spec of Package dlib

#
# spec file for package dlib.spec
#
# Copyright (c) 2017 SUSE LINUX 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/
#

Name:           dlib
Version:        19.22
Release:        0
Summary:        A modern C++ toolkit for solving real world problems
Group:          Development/Libraries/C and C++
License:        BSL-1.0
URL:            http://dlib.net/
Source0:        dlib-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# BuildArch:      noarch

BuildRequires:  pkgconfig
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gcc
BuildRequires:  libffi-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  fdupes

%description
Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. It is used in both industry and academia in a wide range of domains including robotics, embedded devices, mobile phones, and large high performance computing environments. Dlib's open source licensing allows you to use it in any application, free of charge. 

%package -n lib%{name}19_22_0
Summary:        A modern C++ toolkit for solving real world problems
Group:          Development/Libraries/C and C++

%description -n lib%{name}19_22_0
Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. It is used in both industry and academia in a wide range of domains including robotics, embedded devices, mobile phones, and large high performance computing environments. Dlib's open source licensing allows you to use it in any application, free of charge. 


%package        devel
Summary:        Development files for libdlib
Group:          Development/Libraries/C and C++
Requires:       lib%{name}19_22_0

%description    devel
Development files for Dlib, a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems.


%prep
%setup -n %{name}-%{version}

%build
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING="Release" ..
make %{?_smp_mflags}

%install
cd build
make install DESTDIR=%{buildroot}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post -n lib%{name}19_22_0 -p /sbin/ldconfig

%postun -n lib%{name}19_22_0 -p /sbin/ldconfig

%files -n lib%{name}19_22_0
%doc README.md
%defattr(-,root,root)
%{_libdir}/lib%{name}.so*

%files devel
%defattr(-,root,root)
%dir %{_libdir}/cmake/dlib
%{_libdir}/cmake/dlib/*.cmake
%{_libdir}/pkgconfig/%{name}*
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/any
%dir %{_includedir}/%{name}/array
%dir %{_includedir}/%{name}/array2d
%dir %{_includedir}/%{name}/base64
%dir %{_includedir}/%{name}/bayes_utils
%dir %{_includedir}/%{name}/bigint
%dir %{_includedir}/%{name}/binary_search_tree
%dir %{_includedir}/%{name}/bit_stream
%dir %{_includedir}/%{name}/bits
%dir %{_includedir}/%{name}/bound_function_pointer
%dir %{_includedir}/%{name}/bridge
%dir %{_includedir}/%{name}/bsp
%dir %{_includedir}/%{name}/byte_orderer
%dir %{_includedir}/%{name}/clustering
%dir %{_includedir}/%{name}/cmake_utils
%dir %{_includedir}/%{name}/cmd_line_parser
%dir %{_includedir}/%{name}/compress_stream
%dir %{_includedir}/%{name}/conditioning_class
%dir %{_includedir}/%{name}/config_reader
%dir %{_includedir}/%{name}/control
%dir %{_includedir}/%{name}/cpp_pretty_printer
%dir %{_includedir}/%{name}/cpp_tokenizer
%dir %{_includedir}/%{name}/crc32
%dir %{_includedir}/%{name}/cuda
%dir %{_includedir}/%{name}/data_io
%dir %{_includedir}/%{name}/dir_nav
%dir %{_includedir}/%{name}/directed_graph
%dir %{_includedir}/%{name}/disjoint_subsets
%dir %{_includedir}/%{name}/dnn
%dir %{_includedir}/%{name}/entropy_decoder
%dir %{_includedir}/%{name}/entropy_decoder_model
%dir %{_includedir}/%{name}/entropy_encoder
%dir %{_includedir}/%{name}/entropy_encoder_model
%dir %{_includedir}/%{name}/external
%dir %{_includedir}/%{name}/external/cblas
%dir %{_includedir}/%{name}/external/libjpeg
%dir %{_includedir}/%{name}/external/libpng
%dir %{_includedir}/%{name}/external/pybind11
%dir %{_includedir}/%{name}/external/pybind11/include
%dir %{_includedir}/%{name}/external/pybind11/include/pybind11
%dir %{_includedir}/%{name}/external/pybind11/include/pybind11/detail
%dir %{_includedir}/%{name}/external/pybind11/tools
%dir %{_includedir}/%{name}/external/zlib
%dir %{_includedir}/%{name}/filtering
%dir %{_includedir}/%{name}/general_hash
%dir %{_includedir}/%{name}/geometry
%dir %{_includedir}/%{name}/global_optimization
%dir %{_includedir}/%{name}/graph
%dir %{_includedir}/%{name}/graph_cuts
%dir %{_includedir}/%{name}/graph_utils
%dir %{_includedir}/%{name}/gui_core
%dir %{_includedir}/%{name}/gui_widgets
%dir %{_includedir}/%{name}/hash_map
%dir %{_includedir}/%{name}/hash_set
%dir %{_includedir}/%{name}/hash_table
%dir %{_includedir}/%{name}/http_client
%dir %{_includedir}/%{name}/image_keypoint
%dir %{_includedir}/%{name}/image_loader
%dir %{_includedir}/%{name}/image_processing
%dir %{_includedir}/%{name}/image_saver
%dir %{_includedir}/%{name}/image_transforms
%dir %{_includedir}/%{name}/interfaces
%dir %{_includedir}/%{name}/iosockstream
%dir %{_includedir}/%{name}/java
%dir %{_includedir}/%{name}/linker
%dir %{_includedir}/%{name}/logger
%dir %{_includedir}/%{name}/lsh
%dir %{_includedir}/%{name}/lz77_buffer
%dir %{_includedir}/%{name}/lzp_buffer
%dir %{_includedir}/%{name}/manifold_regularization
%dir %{_includedir}/%{name}/map
%dir %{_includedir}/%{name}/matlab
%dir %{_includedir}/%{name}/matrix
%dir %{_includedir}/%{name}/matrix/lapack
%dir %{_includedir}/%{name}/md5
%dir %{_includedir}/%{name}/member_function_pointer
%dir %{_includedir}/%{name}/memory_manager
%dir %{_includedir}/%{name}/memory_manager_global
%dir %{_includedir}/%{name}/memory_manager_stateless
%dir %{_includedir}/%{name}/misc_api
%dir %{_includedir}/%{name}/mlp
%dir %{_includedir}/%{name}/numerical_integration
%dir %{_includedir}/%{name}/opencv
%dir %{_includedir}/%{name}/optimization
%dir %{_includedir}/%{name}/pipe
%dir %{_includedir}/%{name}/python
%dir %{_includedir}/%{name}/quantum_computing
%dir %{_includedir}/%{name}/queue
%dir %{_includedir}/%{name}/rand
%dir %{_includedir}/%{name}/random_forest
%dir %{_includedir}/%{name}/reference_counter
%dir %{_includedir}/%{name}/sequence
%dir %{_includedir}/%{name}/server
%dir %{_includedir}/%{name}/set
%dir %{_includedir}/%{name}/set_utils
%dir %{_includedir}/%{name}/simd
%dir %{_includedir}/%{name}/sliding_buffer
%dir %{_includedir}/%{name}/smart_pointers
%dir %{_includedir}/%{name}/sockets
%dir %{_includedir}/%{name}/sockstreambuf
%dir %{_includedir}/%{name}/sqlite
%dir %{_includedir}/%{name}/stack
%dir %{_includedir}/%{name}/static_map
%dir %{_includedir}/%{name}/static_set
%dir %{_includedir}/%{name}/statistics
%dir %{_includedir}/%{name}/stl_checked
%dir %{_includedir}/%{name}/string
%dir %{_includedir}/%{name}/svm
%dir %{_includedir}/%{name}/sync_extension
%dir %{_includedir}/%{name}/test
%dir %{_includedir}/%{name}/threads
%dir %{_includedir}/%{name}/timeout
%dir %{_includedir}/%{name}/timer
%dir %{_includedir}/%{name}/tokenizer
%dir %{_includedir}/%{name}/tuple
%dir %{_includedir}/%{name}/type_safe_union
%dir %{_includedir}/%{name}/unicode
%dir %{_includedir}/%{name}/vectorstream
%dir %{_includedir}/%{name}/xml_parser
%{_includedir}/%{name}/*.h
%{_includedir}/%{name}/*/*.h
%{_includedir}/%{name}/dlib_basic_cpp_build_tutorial.txt
%{_includedir}/%{name}/dlib_include_path_tutorial.txt
%{_includedir}/%{name}/cassert
%{_includedir}/%{name}/cstring
%{_includedir}/%{name}/fstream
%{_includedir}/%{name}/iomanip
%{_includedir}/%{name}/iosfwd
%{_includedir}/%{name}/iostream
%{_includedir}/%{name}/istream
%{_includedir}/%{name}/locale
%{_includedir}/%{name}/ostream
%{_includedir}/%{name}/sstream
%{_includedir}/%{name}/external/cblas/*.h
%{_includedir}/%{name}/external/libjpeg/*.h
%{_includedir}/%{name}/external/libpng/*.h
%{_includedir}/%{name}/external/pybind11/include/pybind11/*.h
%{_includedir}/%{name}/external/pybind11/include/pybind11/detail/*.h
%{_includedir}/%{name}/external/pybind11/tools/*.cmake
%{_includedir}/%{name}/external/zlib/*.h
%{_includedir}/%{name}/matrix/lapack/*.h
%{_includedir}/%{name}/string/cassert
%{_includedir}/%{name}/string/iomanip
%{_includedir}/%{name}/string/iosfwd
%{_includedir}/%{name}/string/iostream
%{_includedir}/%{name}/string/locale
%{_includedir}/%{name}/cmake_utils/*.cmake

%changelog 
openSUSE Build Service is sponsored by