File fuzzylite5.spec of Package fuzzylite5

#
# spec file for package fuzzylite
#
# 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/
#

%define major 5
%define minor 1
%define so_ver %{major}_%{minor}
Name:           fuzzylite%{major}
Version:        %{major}.%{minor}
Release:        0
Summary:        A fuzzy logic control library in C++
License:        GPL-3.0
Group:          Development/Libraries/C and C++
URL:            https://fuzzylite.com/
Source:         https://github.com/fuzzylite/fuzzylite/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-pkgconfig.patch adam@mizerski.pl -- fix pkgconfig install path; this was fixed in v6.0.
Patch0:         fix-pkgconfig.patch
BuildRequires:  cmake >= 2.8.8
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig

%description
The goal of the FuzzyLite Libraries is to easily design and efficiently operate
fuzzy logic controllers following an object-oriented programming model without
relying on external libraries.

%package -n libfuzzylite%{so_ver}
Summary:        Fuzzylite shared library
Group:          System/Libraries

%description -n libfuzzylite%{so_ver}
The goal of the FuzzyLite Libraries is to easily design and efficiently operate
fuzzy logic controllers following an object-oriented programming model without
relying on external libraries.

%package devel
Summary:        Development files for fuzzylite
Requires:       libfuzzylite%{so_ver} = %{version}

%description devel
The goal of the FuzzyLite Libraries is to easily design and efficiently operate
fuzzy logic controllers following an object-oriented programming model without
relying on external libraries.

%prep
%setup -q -n "fuzzylite-%{version}"
%patch0 -p1

%build
cd fuzzylite
%cmake \
    -DFL_CPP11=ON \
    -DFL_BUILD_STATIC=OFF \
    -DFL_BUILD_TESTS=OFF
make %{?_smp_mflags}

%install
cd fuzzylite
%cmake_install
install -m 644 -D fuzzylite.1 %{buildroot}/%{_mandir}/man1/fuzzylite.1

%post -n libfuzzylite%{so_ver} -p /sbin/ldconfig
%postun -n libfuzzylite%{so_ver} -p /sbin/ldconfig

%files
%{_bindir}/fuzzylite
%{_mandir}/man1/fuzzylite.1*

%files -n libfuzzylite%{so_ver}
%{_libdir}/libfuzzylite.so.%{major}.%{minor}

%files devel
%{_includedir}/fl/
%{_libdir}/libfuzzylite.so
%{_libdir}/pkgconfig/fuzzylite.pc

%changelog
openSUSE Build Service is sponsored by