Skip to content

Commit

Permalink
opae-sdk: fix rhel spec file build errors (#2531)
Browse files Browse the repository at this point in the history
* opae-sdk: fix rhel spec file build errors

Signed-off-by: anandaravuri <ananda.ravuri@intel.com>

* Update opae.spec.rhel

Co-authored-by: Tim Whisonant <tim.whisonant@intel.com>
  • Loading branch information
anandaravuri and tswhison committed Mar 22, 2022
1 parent f44b7c9 commit a3f5e50
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 40 deletions.
44 changes: 23 additions & 21 deletions opae.spec.fedora
Expand Up @@ -9,14 +9,15 @@ ExclusiveArch: x86_64

Group: Development/Libraries
Vendor: Intel Corporation
Requires: uuid
Requires: json-c
Requires: python3
Requires: systemd
Requires: tbb
Requires: hwloc
Requires: spdlog
Requires: libedit

Requires: uuid
Requires: json-c
Requires: python3
Requires: systemd
Requires: tbb
Requires: hwloc
Requires: spdlog
Requires: libedit

URL: https://github.com/OPAE/%{name}-sdk
Source0: https://github.com/OPAE/opae-sdk/releases/download/%{version}-%{opae_release}/%{name}-%{version}-%{opae_release}.tar.gz
Expand Down Expand Up @@ -92,13 +93,9 @@ Additional OPAE tools
%cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DOPAE_PRESERVE_REPOS=ON \
-DOPAE_BUILD_PYTHON_DIST=ON \
-DOPAE_BUILD_FPGABIST=ON
-DOPAE_BUILD_FPGABIST=ON

%if 0%{?rhel}
%make_build
%else
%cmake_build
%endif
%cmake_build


%install
Expand Down Expand Up @@ -143,11 +140,8 @@ cp samples/object_api/object_api.c %{buildroot}%{_usr}/src/opae/samples/object_a
cp samples/n5010-test/n5010-test.c %{buildroot}%{_usr}/src/opae/samples/n5010-test/


%if 0%{?rhel}
%make_install
%else
%cmake_install
%endif
%cmake_install


prev=$PWD
pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/binaries/opae.io
Expand Down Expand Up @@ -366,8 +360,16 @@ done
%{python3_sitearch}/pyopaeuio*



%changelog
* Tue Mar 15 2022 The OPAE Dev Team <opae@lists.01.org> - 2.1.0-1
- Update OPAE spec file and tarball generation script.
- Added support to FPGA Linux kernel DFL driver patchset-6.
- Added support to Intel FPGA PCIe N6000/D5005/N3000 series.
- Various bug fixes
- Various Static code scan bug fixes.
- Updated OPAE documentation.


* Mon Dec 14 2020 The OPAE Dev Team <opae@lists.01.org> - 2.0.0-2
- Update OPAE spec file and tarball generation script
- Fix build errors
Expand All @@ -383,7 +385,7 @@ done
- Various Static code scan bug fixes
- Added python3 support.
- OPAE USMG API are deprecated.
- Updated OPAE documentation.
- Updated OPAE documentation.

* Tue Dec 17 2019 Korde Nakul <nakul.korde@intel.com> 1.4.0-1
- Added support to FPGA Linux kernel Device Feature List (DFL) driver patch set2.
Expand Down
45 changes: 27 additions & 18 deletions opae.spec.rhel
Expand Up @@ -9,11 +9,12 @@ ExclusiveArch: x86_64

Group: Development/Libraries
Vendor: Intel Corporation

Requires: uuid
Requires: json-c
Requires: python3
Requires: systemd
Requires: libcap
Requires: json-c
Requires: python3
Requires: systemd

URL: https://github.com/OPAE/%{name}-sdk
Source0: https://github.com/OPAE/opae-sdk/releases/download/%{version}-%{opae_release}/%{name}-%{version}-%{opae_release}.tar.gz

Expand All @@ -28,9 +29,10 @@ BuildRequires: libuuid-devel
BuildRequires: python3-devel
BuildRequires: python3-jsonschema
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-pyyaml
BuildRequires: rpm-build
BuildRequires: systemd-devel
BuildRequires: libcap-devel


%description
Expand Down Expand Up @@ -69,14 +71,9 @@ OPAE headers, tools, sample source, and documentation
%setup -q -n %{name}-%{version}-%{opae_release}

%build
%cmake -DOPAE_MINIMAL_BUILD=ON \
.
%cmake -DOPAE_MINIMAL_BUILD=ON

%if 0%{?rhel}
%make_build
%else
%cmake_build
%endif
%cmake_build


%install
Expand Down Expand Up @@ -135,11 +132,8 @@ cp binaries/opae.io/opae/io/*.py %{buildroot}%{_usr}/src/opae/samples/opae.io/op
cp binaries/opae.io/scripts/*.py %{buildroot}%{_usr}/src/opae/samples/opae.io/scripts


%if 0%{?rhel}
%make_install
%else
%cmake_install
%endif
%cmake_install


prev=$PWD
pushd %{_topdir}/BUILD/%{name}-%{version}-%{opae_release}/python/opae.admin/
Expand All @@ -156,14 +150,19 @@ popd

# 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}.py; do
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
done
# ethernet
for file in %{buildroot}%{python3_sitelib}/ethernet/{hssicommon,hssiloopback,hssimac,hssistats}.py; do
chmod a+x $file
done

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

%files
%dir %{_datadir}/opae
%doc %{_datadir}/opae/RELEASE_NOTES.md
Expand All @@ -182,6 +181,7 @@ done
%{_libdir}/libopaemem.so.*
%{_libdir}/libopaeuio.so.*
%{_libdir}/libopaevfio.so.*
%{_libdir}/libofs_cpeng.so.*

%{_libdir}/opae/libxfpga.so
%{_libdir}/opae/libopae-v.so
Expand Down Expand Up @@ -321,7 +321,16 @@ done
%{python3_sitelib}/packager*



%changelog
* Tue Mar 15 2022 The OPAE Dev Team <opae@lists.01.org> - 2.1.0-1
- Update OPAE spec file and tarball generation script.
- Added support to FPGA Linux kernel DFL driver patchset-6.
- Added support to Intel FPGA PCIe N6000/D5005/N3000 series.
- Various bug fixes
- Various Static code scan bug fixes.
- Updated OPAE documentation.

* Mon Dec 14 2020 The OPAE Dev Team <opae@lists.01.org> - 2.0.0-2
- Update OPAE spec file and tarball generation script
- Fix build errors
Expand Down
2 changes: 1 addition & 1 deletion packaging/opae/rpm/create
Expand Up @@ -64,7 +64,7 @@ declare -a PKG_DEPS=(\
'rpm-build' \
'systemd' \
'rpmdevtools' \
'libcap-devel'\
'systemd-devel'\
)

if [ "${WHICH_RPM}" = 'fedora' ]; then
Expand Down

0 comments on commit a3f5e50

Please sign in to comment.