File skelcd-NVIDIA-compute.spec of Package skelcd-NVIDIA-compute
#
# spec file for package skelcd-NVIDIA-compute
#
# Copyright (c) 2020 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 http://bugs.opensuse.org/
#
%define product NVIDIA-compute
%define COMPANY_NAME NVIDIA Corporation
%define EULA_URL http://docs.nvidia.com/cuda/eula/index.html
%define skelcd1_path usr/lib/skelcd/CD1
Name: skelcd-%{product}
BuildRequires: suse-build-key
AutoReqProv: off
Version: 2020.05.04
Release: 0
Summary: CD skeleton
License: BSD-3-Clause
Group: Metapackages
ExclusiveArch: x86_64 aarch64
Provides: skelcd = %{version}
Conflicts: otherproviders(skelcd)
%description
Internal package only.
%package -n skelcd-EULA-%{product}
Summary: EULA for media
Group: Metapackages
%description -n skelcd-EULA-%{product}
Internal package only.
%prep
%build
mkdir -p license.dir
cd license.dir
cat <<EOF > license.txt
==========================================================
This Module contains software under the terms and conditions of a
3rd party EULA (End User License Agreement).
The EULA can be found at http://docs.nvidia.com/cuda/eula/index.html.
==========================================================
EOF
#The Software provided by this module is provided by
# %COMPANY_NAME
#It is governed by an End User License Agreement which can
#be found under:
# %EULA_URL
%install
## The new way to do it...
mkdir -p $RPM_BUILD_ROOT/%{skelcd1_path}
pushd license.dir
ls -1 > directory.yast # required for downloading of EULAs from SCC
tar cvzf license-%{product}.tar.gz --owner=root --group=root *txt directory.yast
cp license-%{product}.tar.gz $RPM_BUILD_ROOT/%{skelcd1_path}/
popd
%files -n skelcd-EULA-%{product}
%defattr(644,root,root,755)
%dir /usr/lib/skelcd/
/%{skelcd1_path}
%changelog