Blob Blame History Raw
%define         opae_release 1

Summary:        Open Programmable Acceleration Engine (OPAE) SDK
Name:           opae
Version:        2.1.0
Release:        %{opae_release}%{?dist}
License:        BSD
ExclusiveArch:  x86_64

Group:          Development/Libraries
Vendor:         Intel Corporation

URL:  {name}-sdk

BuildRequires:  make
BuildRequires:  cmake
BuildRequires:  git
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  json-c-devel
BuildRequires:  libuuid-devel
BuildRequires:  python3-devel
BuildRequires:  python3-jsonschema
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-pyyaml
BuildRequires:  python3-pybind11
BuildRequires:  rpm-build
BuildRequires:  systemd-devel
BuildRequires:  tbb-devel
BuildRequires:  hwloc-devel
BuildRequires:  pybind11-devel
BuildRequires:  cli11-devel
BuildRequires:  spdlog-devel
BuildRequires:  libedit-devel

Open Programmable Acceleration Engine (OPAE) is a software framework
for managing and accessing programmable accelerators (FPGAs).
Its main parts are:

* OPAE Software Development Kit (OPAE SDK) (this package)
* OPAE Linux driver for Intel(R) PAC with Arria(R) 10 GX FPGA
* Intel(R) PAC N6000/D5005, Silicom FPGA SmartNIC N5010 Series,
* Intel FPGA Programmable Acceleration Card N6000

OPAE SDK is a collection of libraries and tools to facilitate the
development of software applications and accelerators using OPAE.
It provides a library implementing the OPAE C API for presenting a
streamlined and easy-to-use interface for software applications to
discover, access, and manage FPGA devices and accelerators using
the OPAE software stack.

%package devel
Summary:    OPAE headers, sample source, and documentation
Requires:   opae
Requires:   libuuid-devel, %{name}%{?_isa} = %{version}-%{release}
Requires:   openssl-devel

%description devel
OPAE headers, tools, sample source, and documentation

%package extra-tools
Summary:    Additional OPAE tools
Requires:   opae-devel

%description extra-tools
This package contains OPAE extra tools binaries, 
software tools for accelerators

# Workaround a problem with pybind11 *.so not having build-id's
%undefine _missing_build_ids_terminate_build

%setup -q -n %{name}-%{version}-%{opae_release}



mkdir -p %{buildroot}%{_datadir}/opae
cp %{buildroot}%{_datadir}/opae/
cp LICENSE %{buildroot}%{_datadir}/opae/LICENSE
cp COPYING %{buildroot}%{_datadir}/opae/COPYING

mkdir -p %{buildroot}%{_usr}/src/opae/cmake/modules
for s in \
    FindCLI11.cmake \
    FindCap.cmake \
    FindHwloc.cmake \
    FindSphinx.cmake \
    FindTbb.cmake \
    FindUUID.cmake \
    FindUdev.cmake \
    Findedit.cmake \
    Findjson-c.cmake \
    Findspdlog.cmake \
    OFS.cmake \
    OPAE.cmake \
    OPAECompiler.cmake \
    OPAEExternal.cmake \
    OPAEGit.cmake \
    OPAEPackaging.cmake \
  cp "cmake/modules/${s}" %{buildroot}%{_usr}/src/opae/cmake/modules
  chmod a+x %{buildroot}%{_usr}/src/opae/cmake/modules/$s

mkdir -p %{buildroot}%{_usr}/src/opae/samples
mkdir -p %{buildroot}%{_usr}/src/opae/samples/hello_fpga/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/hello_events/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/object_api/
mkdir -p %{buildroot}%{_usr}/src/opae/samples/n5010-test/

cp samples/hello_fpga/hello_fpga.c %{buildroot}%{_usr}/src/opae/samples/hello_fpga/
cp samples/hello_events/hello_events.c %{buildroot}%{_usr}/src/opae/samples/hello_events/
cp samples/object_api/object_api.c %{buildroot}%{_usr}/src/opae/samples/object_api/
cp samples/n5010-test/n5010-test.c %{buildroot}%{_usr}/src/opae/samples/n5010-test/


pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/hssi
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/fpgadiag
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/%__cmake_builddir/libraries/pyopae/stage
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/libraries/pyopaeuio
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/opae.admin
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/pacsign
%{__python3} install --single-version-externally-managed --root=%{buildroot}

pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/packager
%{__python3} install --single-version-externally-managed --root=%{buildroot}

# Make rpmlint happy about install permissions
# admin tools
for file in %{buildroot}%{python3_sitelib}/opae/admin/tools/{fpgaflash,fpgaotsu,fpgaport,fpgasupdate,ihex2ipmi,rsu,super_rsu,bitstream_info,opaevfio,pci_device,fpgareg}.py; do
   chmod a+x $file
# ethernet
for file in %{buildroot}%{python3_sitelib}/ethernet/{hssicommon,hssiloopback,hssimac,hssistats}.py; do
   chmod a+x $file
# diag
for file in %{buildroot}%{python3_sitearch}/opae/diag/{common,fecmode,fpgadiag,fpgalpbk,fpgamac,fpgastats,fvlbypass,mactest,mux}.py; do
   chmod a+x $file

# packager
for file in %{buildroot}%{python3_sitelib}/packager/tools/{afu_json_mgr,packager}.py; do
   chmod a+x $file

%dir %{_datadir}/opae
%doc %{_datadir}/opae/
%license %{_datadir}/opae/LICENSE
%license %{_datadir}/opae/COPYING





%config(noreplace) %{_sysconfdir}/opae/fpgad.cfg*
%config(noreplace) %{_sysconfdir}/sysconfig/fpgad.conf*


%systemd_post fpgad.service

%systemd_preun fpgad.service

%files devel
%dir %{_includedir}/opae
%dir %{_usr}/src/opae





%files extra-tools


* Tue Mar 15 2022 The OPAE Dev Team <> - 2.1.0-1
- Update OPAE spec file and tarball generation script.
- Added support to Intel FPGA DFL Driver that has been upstreamed to Linux Kernel v5.7-5.17.
- Added support to Intel FPGA PCIe N6000/D5005/N3000 series.
- Removed OPAE-SIM from OPAE-SDK.
- Various bug fixes
- Various Static code scan bug fixes.
- Updated OPAE documentation.

* Thu Jan 20 2022 Fedora Release Engineering <> - 2.0.0-2.8
- Rebuilt for

* Sat Dec 04 2021 Tom Rix <> - 2.0.0-2.7
- Disable pacsign, the user user of the local libcrypto
- Remove the whole libcrypto directory in prep
- Remove python3-sphinx, doxygen from BuildRequires

* Fri Dec 03 2021 Tom Rix <> - 2.0.0-2.6
- Fix Source0 url
- Remove git from BuildRequires
- Remove in prep stage

* Fri Dec 03 2021 Miro Hroncok <> - 2.0.0-2.5
- Do not provide
- Fixes rhbz#2028852

* Thu Jul 22 2021 Fedora Release Engineering <> - 2.0.0-2.3
- Rebuilt for

* Sat Jul 10 2021 Bjorn Esser <> - 2.0.0-2.2
- Rebuild for versioned symbols in json-c

* Thu Jul 08 2021 Bjorn Esser <> - 2.0.0-2.1
- Fix automatic bump of the release tag
- Add a patch to replace the deprecated pthread_yield function
- Whitespace cleanup
- Use new-style cmake macros

* Fri Jun 04 2021 Python Maint <> - 2.0.0-2.2
- Rebuilt for Python 3.10

* Mon May 10 2021 Jonathan Wakely <> - 2.0.0-2.1
- Rebuilt for removed libstdc++ symbols (#1937698)

* Mon Dec 14 2020 The OPAE Dev Team <> - 2.0.0-2
- Update OPAE spec file and tarball generation script
- Fix build errors

* Thu Sep 17 2020 Ananda Ravuri <> 2.0.0-1
- Various Static code scan bug fixes
- Added support to FPGA Linux kernel Device Feature List (DFL) driver.
- Added support to PAC card N3000 series.
- Added PACSign, bitstream_info, fpgasudpate, rsu, fpgaotsu, fpgaport  python tools.
- Added ethernet tools for PAC card N3000.
- Various bug fixes
- Various memory leak fixes.
- Various Static code scan bug fixes
- Added python3 support.
- OPAE USMG API are deprecated.
- Updated OPAE documentation.

* Tue Dec 17 2019 Korde Nakul <> 1.4.0-1
- Added support to FPGA Linux kernel Device Feature List (DFL) driver patch set2.
- Increased test cases and test coverage
- Various bug fixes
- Various compiler warning fixes
- Various memory leak fixes
- Various Static code scan bug fixes
- Added new FPGA MMIO API to write 512 bits