File kompute.spec of Package Kompute

#
# spec file for package kompute
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define _sover 0
Name:           kompute
Version:        0.9.0
Release:        0
Summary:        General purpose GPU compute framework built on Vulkan
License:        MIT
URL:            https://github.com/KomputeProject/kompute
Source:         %{name}-%{version}.tar.gz
BuildRequires:  cmake >= 3.14
BuildRequires:  fdupes
BuildRequires:  fmt-10-devel
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  glslang-devel
BuildRequires:  ninja
BuildRequires:  shaderc
BuildRequires:  spdlog-devel
BuildRequires:  vulkan-devel
BuildRequires:  vulkan-tools

%description
General purpose GPU compute framework built on Vulkan to support 1000s
of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends).

%package devel
Summary:        Development files for kompute
Requires:       libkompute%{_sover} = %{version}

%description devel
Development files for kompute

%package -n libkompute%{_sover}
Summary:        General purpose GPU compute framework built on Vulkan

%description -n libkompute%{_sover}
General purpose GPU compute framework built on Vulkan to support 1000s
of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends).

%package -n libkp_logger
Summary:        Logging library for Kompute

%description -n libkp_logger
Logging library for Kompute

%prep
%autosetup -p1

%build
%define __builder ninja

%cmake \
    -DKOMPUTE_OPT_BUILD_SHADERS=ON \
    -DDKOMPUTE_OPT_USE_SPDLOG=ON \
    -DKOMPUTE_OPT_USE_BUILT_IN_SPDLOG=OFF \
    -DKOMPUTE_OPT_USE_BUILT_IN_FMT=OFF \
    -DKOMPUTE_OPT_USE_BUILT_IN_GOOGLE_TEST=OFF \
    -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=OFF \
    -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON \
    -DKOMPUTE_OPT_BUILD_TESTS=OFF

%cmake_build

%install
%cmake_install

%ldconfig_scriptlets -n libkompute0

%files -n libkompute%{_sover}
%doc README.md
%license LICENSE
%{_libdir}/libkompute.so.0
%{_libdir}/libkompute.so.%{version}

%files -n libkp_logger
%{_libdir}/libkp_logger.so

%files devel
%{_includedir}/kompute
%{_includedir}/ShaderLogisticRegression.hpp
%{_includedir}/ShaderOpMult.hpp
%{_libdir}/cmake/kompute/
%{_libdir}/libkompute.so

%changelog
openSUSE Build Service is sponsored by