Blob Blame History Raw
# spec file for package accel-config
# Copyright (c) 2022 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

%define pkg_libname libaccel-config1
%define src_name idxd-config-accel-config-v%{version}
Name:           accel-config
Release:        0
Summary:        Configure accelerator subsystem devices
License:        GPL-2.0-only
Source:         %{url}/archive/accel-config-v%{version}.tar.gz#/%{src_name}.tar.gz
BuildRequires:  asciidoc
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  binutils
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  xmlto
BuildRequires:  pkgconfig(json-c)
BuildRequires:  pkgconfig(uuid)
Requires:       %{pkg_libname} = %{version}-%{release}
ExclusiveArch:  x86_64

Utility library and command-line tool for configuring the Intel
Data Streaming Accelerator (DSA) and Intel Analytics Accelerator

%package -n %{name}-devel
Summary:        Development files for libaccfg
License:        LGPL-2.1-only
Requires:       %{pkg_libname} = %{version}-%{release}

%description -n %{name}-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package -n %{pkg_libname}
Summary:        Configuration library for accelerator subsystem devices
License:        LGPL-2.1-only
Requires:       kmod(idxd.ko)

%description -n %{pkg_libname}
Libraries for %{name}.

%setup -q -n %{src_name}

echo %{version} > version

find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{pkg_libname} -p /sbin/ldconfig
%postun -n %{pkg_libname} -p /sbin/ldconfig

%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/accel-config-licenses LICENSE_GPL_2_0
%dir %{_sysconfdir}/accel-config
%config %{_sysconfdir}/accel-config/accel-config.conf.sample
%dir %{_datadir}/accel-config
%dir %{_datadir}/accel-config/contrib
%dir %{_datadir}/accel-config/contrib/configs

%files -n %{pkg_libname}
%license Documentation/COPYING licenses/BSD-MIT licenses/CC0
%license licenses/libaccel-config-licenses accfg/lib/LICENSE_LGPL_2_1

%files -n %{name}-devel
%license Documentation/COPYING