File skelcd-SL-Micro.spec of Package skelcd-SL-Micro
#
# spec file for package skelcd-SL-Micro
#
# 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 https://bugs.opensuse.org/
#
%define PRODUCT_PATH_REL_NOTES SUSE_Linux_Micro_6_1
%define PRODUCT SL-Micro
%define product SL-Micro
# release is a beta
%if 0%{?beta_flag} == 1
%define license_dir license.beta
%else
%define license_dir license.final
%endif
# SLE15 uses different paths
%if 0%{?suse_version} > 1320
%define skelcd1_path usr/lib/skelcd/CD1
%else
%define skelcd1_path CD1
%endif
Name: skelcd-%{product}
Version: 2025.08.25
Release: 0
Summary: CD skeleton
License: GPL-2.0-only
Group: Metapackages
Source: skelcd.tar.bz2
Source2: README
Source3: README.BETA
Source99: skelcd-SL-Micro-rpmlintrc
BuildRequires: suse-build-key
Conflicts: skelcd
# please repo-checker (bsc#1089174)
Provides: skelcd = %{version}
%description
Internal package only.
%package -n skelcd-EULA-%{product}
Summary: EULA for media
Group: Metapackages
%description -n skelcd-EULA-%{product}
Internal package only.
%prep
%setup -q -n skelcd
%build
%install
mkdir -p %{buildroot}/%{skelcd1_path}/boot
cp READMEs/default/* %{buildroot}/%{skelcd1_path}/
cp %{_prefix}/lib/rpm/gnupg/keys/* %{buildroot}/%{skelcd1_path}/
for i in README \
%if 0%{?beta_flag} == 1
README.BETA \
%endif
; do
cp -pv $RPM_SOURCE_DIR/$i %{buildroot}/%{skelcd1_path}/$i
done
## The new way to do it...
mkdir -p %{buildroot}/%{skelcd1_path}/media.1
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 %{buildroot}/%{skelcd1_path}/
ln -s license-%{PRODUCT}.tar.gz %{buildroot}/%{skelcd1_path}/license.tar.gz
popd
#
# Install PDF documentation
#
mkdir -p %{buildroot}/%{skelcd1_path}/docu/
for i in ar cs de en es fr hu it ja ko pl pt_BR ru zh_CN zh_TW ; do
test -f "%{_datadir}/doc/manual/%{product}-installquick_$i-pdf/*.pdf" || continue;
mkdir -p %{buildroot}/%{skelcd1_path}/docu/$i
for book in admin deployment installquick storage; do
pdf="%{_datadir}/doc/manual/%{product}-${book}_$i-pdf/*.pdf"
test -f $pdf && \
cp -av $pdf %{buildroot}/%{skelcd1_path}/docu/$i/${book}.pdf
done
# remove empty directories
rmdir %{buildroot}/%{skelcd1_path}/docu/$i ||:
done
%files
%defattr(644,root,root,755)
%exclude /%{skelcd1_path}/license*.tar.gz
%dir %{_prefix}/lib/skelcd/
/%{skelcd1_path}
%files -n skelcd-EULA-%{product}
%defattr(644,root,root,755)
/%{skelcd1_path}/license-%{PRODUCT}.tar.gz
/%{skelcd1_path}/license.tar.gz
%changelog