rpmbuild: add conditions around ASE packaging
# -*- rpm-spec -*-
+%define with_ase "@BUILD_ASE@"
+
BuildRoot: %_topdir/@CPACK_PACKAGE_FILE_NAME@
Summary: @CPACK_PACKAGE_DESCRIPTION_SUMMARY@
@@ -9,7 +11,10 @@ License: @CPACK_RPM_PACKAGE_LICENSE@
Group: @CPACK_META_GROUP_NAME@
Vendor: @CPACK_PACKAGE_VENDOR@
Prefix: @CMAKE_INSTALL_PREFIX@
-Requires: opae-libs , opae-devel , opae-tools, opae-tools-extra, opae-ase
+Requires: opae-libs , opae-devel , opae-tools, opae-tools-extra
+%if %with_ase == "ON"
+Requires: opae-ase
+%endif
Source0: @CPACK_PACKAGE_NAME@.tar.gz
%description
@@ -19,7 +24,6 @@ Source0: @CPACK_PACKAGE_NAME@.tar.gz
%define _rpmdir %_topdir/RPMS
%define _srcrpmdir %_topdir/SRPMS
-
%package libs
Summary: Runtime libraries for OPAE applications
Group: libs
@@ -54,7 +58,7 @@ Prefix: @CPACK_RPM_RELOCATION_PATHS@
%description tools-extra
This package contains OPAE extra tools binaries
-
+%if %with_ase == "ON"
%package ase
Summary: OPAE AFU Simulation Environment
Group: ase
@@ -62,6 +66,7 @@ Requires: opae-libs , opae-devel
%description ase
This package contains OPAE AFU Simulation Environment
+%endif
%package tests
Summary: OPAE tests package
@@ -194,6 +199,7 @@ ldconfig
%dir @CMAKE_INSTALL_PREFIX@/share/opae/python/*
@CMAKE_INSTALL_PREFIX@/share/opae/python/*
+%if %with_ase == "ON"
%files ase
%defattr(-,root,root,-)
@CMAKE_INSTALL_PREFIX@/bin/afu_sim_setup
@@ -203,6 +209,7 @@ ldconfig
%dir @CMAKE_INSTALL_PREFIX@/share/opae/ase/
%dir @CMAKE_INSTALL_PREFIX@/share/opae/ase/*
@CMAKE_INSTALL_PREFIX@/share/opae/ase/*
+%endif
%files tests
%defattr(-,root,root,-)
