File skelcd-sled.spec of Package skelcd-sled

# spec file for package skelcd-sled
# Copyright (c) 2014 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

# release is a beta
%define beta 0

Name:           skelcd-sled
BuildRequires:  recode
BuildRequires:  release-notes-sled
BuildRequires:  sled-gnomeuser_en-pdf
BuildRequires:  sled-installquick_de-pdf
BuildRequires:  sled-installquick_en-pdf
BuildRequires:  sled-installquick_es-pdf
BuildRequires:  sled-installquick_fr-pdf
BuildRequires:  sled-installquick_it-pdf
BuildRequires:  sled-installquick_ja-pdf
BuildRequires:  sled-installquick_pt_BR-pdf
BuildRequires:  sled-installquick_zh_CN-pdf
BuildRequires:  sled-installquick_zh_TW-pdf
BuildRequires:  suse-build-key
BuildRequires:  w3m
%if 0%{?beta} == 1
%define license_dir license.beta
%define license_dir
AutoReqProv:    off
Version:        2014.1.15
Release:        0
Summary:        CD skeleton
License:        GPL-2.0
Group:          Metapackages
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         skelcd.tar.bz2
Source2:        README
Source3:        README.BETA
Source4:        README.manual
ExclusiveArch:  %ix86 x86_64

Internal package only.

%setup -n skelcd -q


mkdir -p $RPM_BUILD_ROOT/CD1/boot
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 \
        ; do
  # 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
## The newest way to do it...
mkdir -p $RPM_BUILD_ROOT/CD1/media.1
pushd %license_dir
ls -1 > directory.yast # required for downloading of EULAs from SCC
tar cvzf license.tar.gz --owner=root --group=root *txt directory.yast
cp license.tar.gz $RPM_BUILD_ROOT/CD1/
# Install NEWS file
w3m -dump /usr/share/doc/release-notes/SUSE_Linux_Enterprise_Desktop_12/RELEASE-NOTES.en.html > $RPM_BUILD_ROOT/CD1/NEWS
# Install PDF documentation
# the installation quickstart guide is the only one translated
# GNOME quickstart is only english
for i in ar cs de en es fr hu it ja ko pl pt_BR ru zh_CN zh_TW ; do
  mkdir -p $RPM_BUILD_ROOT/CD1/docu/$i
  for book in installquick gnomeuser; do
    test -f $pdf && \
      cp -av $pdf $RPM_BUILD_ROOT/CD1/docu/$i/${book}.pdf
  # remove empty directories
  rmdir $RPM_BUILD_ROOT/CD1/docu/$i ||:

# Install release notes as HTML pages
cp -vp /usr/share/doc/release-notes/SUSE_Linux_Enterprise_Desktop_1?/RELEASE-NOTES.en.* \
w3m -dump $RPM_BUILD_ROOT/CD1/docu/RELEASE-NOTES.en.html > $RPM_BUILD_ROOT/CD1/docu/RELEASE-NOTES.en.txt


%exclude /CD1/license.tar.gz

%package -n skelcd-EULA-sled
Summary:        EULA for media
Group:          Metapackages

%description -n skelcd-EULA-sled
Internal package only.

%files -n skelcd-EULA-sled

openSUSE Build Service is sponsored by