File CAASP-release.spec of Package 000product

# spec file for package caasp-release (Version 1.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#

# norootforbuild


Name:           caasp-release
Summary:        ___SUMMARY___ ___BETA_VERSION___
Version:        ___VERSION___
Release:        0
License:        GPL-2.0+
Group:          System/Fhs
BuildRequires:  skelcd-control-CAASP
BuildRequires:  skelcd-EULA-caasp
Recommends:     branding
# in rare cases, 'ln' is not found...
Requires(post): coreutils
Requires:	issue-generator
Provides:       distribution-release
Provides:       product(SUSE_CAASP) = %{version}-%{release}


___PRODUCT_PROVIDES___

___PRODUCT_DEPENDENCIES___


# Make sure we are at SLES12 SP2 level
PreReq:		glibc >= 2.19
Conflicts:	kernel < 4.4

AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# this package should only be available for the "basearchs" of a product
ExclusiveArch:  %ix86 x86_64 ppc64le s390x aarch64

%description
___DESCRIPTION___


___FLAVOR_PACKAGES___

%prep

%build

%install
mkdir -p $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/usr/lib/issue.d
echo -e "\nWelcome to ___SUMMARY___ ___BETA_VERSION___ (%{_target_cpu}) - Kernel \\\r (\\\l).\n" > $RPM_BUILD_ROOT/usr/lib/issue.d/00-OS
echo -e "\n" > $RPM_BUILD_ROOT/usr/lib/issue.d/99-OS

touch $RPM_BUILD_ROOT/etc/motd

# Put EULA into correct place
mkdir -p $RPM_BUILD_ROOT//etc/YaST2/licenses/CAASP
cd $RPM_BUILD_ROOT//etc/YaST2/licenses/CAASP
tar -xf /CD1/license.tar.gz  # --overwrite
echo "directory.yast" > directory.yast
ls lic* > directory.yast



___CREATE_OS_RELEASE_FILE___

___CREATE_PRODUCT_FILES___

%post
# Put EULA into correct place
if [ ! -e /etc/YaST2/licenses/base ] ; then
          ln -sf CAASP /etc/YaST2/licenses/base
fi

%clean
rm -rf %buildroot

%files
%defattr(644,root,root,755)
%config /etc/os-release
%dir /etc/products.d
/etc/products.d/*
%dir /etc/YaST2/
%config(noreplace) /etc/motd
%dir /etc/YaST2/licenses/
%dir /etc/YaST2/licenses/CAASP/
# no %doc here, or we will not install them
/etc/YaST2/licenses/CAASP/license*txt
%doc /etc/YaST2/licenses/CAASP/directory.yast
%dir /usr/lib/issue.d
/usr/lib/issue.d/*-OS

%changelog
openSUSE Build Service is sponsored by