File skelcd-ha.spec of Package skelcd-ha
#
# spec file for package skelcd-ha
#
# Copyright (c) 2015 SUSE LINUX 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/
#
# release is a beta
%define beta 0
Name: skelcd-ha
BuildRequires: libxml2
BuildRequires: recode
BuildRequires: release-notes-ha
BuildRequires: sle-ha-guide_en-pdf
BuildRequires: suse-build-key
BuildRequires: w3m
BuildRequires: yast2-installation >= 2.17.44
BuildRequires: yast2-installation-control
%if 0%{?beta} == 1
%define license_dir license.beta
%else
%define license_dir license.final
%endif
AutoReqProv: off
Conflicts: skelcd-SUSE_Linux skelcd skelcd-SUSE_Linux-Addon skelcd-ISSLE-Addon
Version: 2015.10.28
Release: 0
Summary: skeleton package for High Availability Extension
License: GPL-2.0+
Group: Metapackages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: skelcd.tar.bz2
Source2: README
Source3: README.BETA
Source4: README.manual
Source5: installation.xml
%description
skeleton package for High Availability Storage Infrastructure extension
%package -n skelcd-EULA-ha
Summary: EULA for media
Group: Metapackages
%description -n skelcd-EULA-ha
Internal package only.
%prep
%setup -n skelcd -q
%build
%install
mkdir -p $RPM_BUILD_ROOT/CD1/boot
cp READMEs/* $RPM_BUILD_ROOT/CD1/
test -s /usr/lib/rpm/gnupg/pubring.gpg || exit 1
cp -v /usr/lib/rpm/gnupg/pubring.gpg $RPM_BUILD_ROOT/CD1/
(cd $RPM_BUILD_ROOT/CD1 ; /usr/lib/rpm/gnupg/dumpsigs ./pubring.gpg >/dev/null 2>&1 ; /usr/lib/rpm/gnupg/dumpsigs ./pubring.gpg )
for i in README \
%if %{?beta} == 1
README.BETA \
%endif
; do
cp -pv $RPM_SOURCE_DIR/$i $RPM_BUILD_ROOT/CD1/$i
# no DOS for ppc
%ifarch ppc
# but Mac linebreaks
cp $RPM_BUILD_ROOT/CD1/$i $RPM_BUILD_ROOT/CD1/$i.mac.txt
recode utf8..mac $RPM_BUILD_ROOT/CD1/$i.mac.txt
%endif
done
## The new way to do it...
mkdir -p $RPM_BUILD_ROOT/CD1/media.1
pushd %license_dir
for i in * ; do
for j in `seq 1 102` ; do
############123456789012345678901234567890123456789012345678901234567890
echo " " >> $i
done
done
ls -1 > directory.yast # required to allow downloading of yast licenses from SCCa
tar cvzf license.tar.gz --owner=root --group=root *txt directory.yast
cp license.tar.gz $RPM_BUILD_ROOT/CD1/
popd
#
# Install NEWS file
#
w3m -dump /usr/share/doc/release-notes/SUSE_Linux_Enterprise_High_Availability_Extension_12/RELEASE-NOTES.en.html > $RPM_BUILD_ROOT/CD1/NEWS
install -d $RPM_BUILD_ROOT/CD1/docu/
# install $RPM_SOURCE_DIR/README.manual $RPM_BUILD_ROOT/CD1/docu/
#
# Install release notes as HTML pages
#
cp -vp /usr/share/doc/release-notes/SUSE_Linux_Enterprise_High_Availability_Extension_12/RELEASE-NOTES.en.* \
$RPM_BUILD_ROOT/CD1/docu/
w3m -dump $RPM_BUILD_ROOT/CD1/docu/RELEASE-NOTES.en.html > $RPM_BUILD_ROOT/CD1/docu/RELEASE-NOTES.en.txt
#
cp /usr/share/doc/manual/sle-ha-guide_en-pdf/book.sleha_en.pdf $RPM_BUILD_ROOT/CD1/docu/sleha_en.pdf
# Add control file, BNC #440608
mkdir -p $RPM_BUILD_ROOT/CD1
# Verify syntax
xmllint -noout -relaxng /usr/share/YaST2/control/control.rng $RPM_SOURCE_DIR/installation.xml
cp $RPM_SOURCE_DIR/installation.xml $RPM_BUILD_ROOT/CD1/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%exclude /CD1/license.tar.gz
/CD1
%files -n skelcd-EULA-ha
%defattr(644,root,root,755)
/CD1/license.tar.gz
%changelog