LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kiwi-config-openSUSE.spec of Package kiwi-config-openSUSE (Project openSUSE:Factory:Live)

# spec file for package kiwi-config-openSUSE
# Copyright (c) 2017 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/

Name:           kiwi-config-openSUSE
BuildRequires:  fdupes
BuildRequires:  jing
BuildRequires:  kiwi
BuildRequires:  kiwi-desc-isoboot
BuildRequires:  kiwi-desc-oemboot
BuildRequires:  kiwi-doc
BuildRequires:  kiwi-tools
BuildRequires:  libxml2-tools
BuildRequires:  libxslt
# Required to make YaST2 pick the right keyboard mappings
BuildRequires:  openSUSE-release
BuildRequires:  skelcd-control-openSUSE >= 13.2.15
BuildRequires:  skelcd-openSUSE
BuildRequires:  xdm
BuildRequires:  yast2-country
BuildRequires:  yast2-installation
Summary:        KDE live CD
License:        BSD-3-Clause
Group:          System/Boot
Version:        13.3
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source1:        COPYING
Source3:        config.sh.in
Source4:        config.xml.in
Source9:        isopatch.sh.in
Source10:       README
Source13:       start-install.sh
Source14:       installation.desktop
Source16:       langset.service
Source17:       99-ignore-live-usb.fdi
Source20:       geturls.xsl
Source22:       getcountrydata.rb
Source23:       langset.sh
Source27:       SoftLocks
Source30:       GPL-2.0.txt
Source31:       gpl-3.0.txt
Source32:       kiwi-config-openSUSE-rpmlintrc
ExcludeArch:    ia64 ppc64 ppc64le s390x s390 ppc

The package contains various kiwi configs for openSUSE live media

%setup -T -c

localedir=`mktemp -d`
OUTPUTDIR=$localedir/ /usr/lib/YaST2/bin/y2base %{SOURCE22} UI
pushd $localedir
for i in *.UTF-8; do
  mv $i ${i/.UTF-8/}
for config in livecd-kde livecd-gnome livecd-x11; do
  mkdir $config
  cd $config
  desktop=`echo $config | cut -d- -f2`
  type=`echo $config | cut -d- -f1`

  sed -e "s,^desktop=,desktop=$desktop," %{SOURCE3} > config.sh

  sed -e "s,@CONFIG@,/usr/share/openSUSE-kiwi/$config," %{SOURCE4} > config.xml
  sed -i -e "s,@VERSION@,$kiwiversion," config.xml
  sed -i -e "s,@FLAVOR@,$config," config.xml
  volid="openSUSE Tumbleweed Live"
  case $desktop in
      sed -i -e "s,@PLIST@,GNOME-cd," config.xml
      volid="openSUSE Tumbleweed GNOME Live"
      sed -i -e "s,@PLIST@,KDE-cd," config.xml
      volid="openSUSE Tumbleweed KDE Live"
      sed -i -e "s,@PLIST@,X11-cd," config.xml
  label=`echo "$volid" | sed -e 's, ,_,g'`
  sed -i -e "s,@VOLID@,$volid,; s,@LABEL@,$label," config.xml
  %ifarch x86_64
    sed -i -e "s,@BOOTKERNEL@,default," config.xml
    #sed -i -e "s,@BOOTKERNEL@,desktop," config.xml
    sed -i -e "s,@BOOTKERNEL@,default," config.xml
    #sed -i -e "s,@BOOTKERNEL@,std," config.xml
    sed -i -e 's,firmware="uefi",,' config.xml
  xmllint --format config.xml > t && mv t config.xml
  jing /usr/share/kiwi/modules/KIWISchema.rng config.xml

  sed -e "s,^desktop=,desktop=$desktop," %{SOURCE9} > isopatch.sh
  chmod a+x isopatch.sh
 #test -z "$out" # jing is a great tool always exit 0
  mkdir config-cdroot
  cd config-cdroot
  install -m 644 %{SOURCE30} GPLv2.txt
  install -m 644 %{SOURCE31} GPLv3.txt
  tar czf ../config-cdroot.tgz *
  cd ..
  rm -rf config-cdroot
  mkdir -p root/var/lib/livecd
  cd root
  install -m 644 /CD1/license.tar.gz .
  mkdir rpmkeys
  cp /CD1/gpg-pubkey* rpmkeys
  install -m 644 -D /CD1/control.xml etc/YaST2/control.xml
  /usr/bin/xsltproc %{SOURCE20} /CD1/control.xml > var/lib/livecd/geturls.sh
  mkdir -p var/lib/zypp
  install -m 644 %{SOURCE27} var/lib/zypp/SoftLocks
  echo 0123456-7890-$desktop-$type-0123456 > var/lib/zypp/AnonymousUniqueId
  cp -a $localedir etc/langset
  install -m 755 %{SOURCE23} etc/langset.sh
  install -D -m 644 %{SOURCE16} usr/lib/systemd/system/langset.service
  # Add icon for net installation to desktop
  install -D -m 755 %{SOURCE13} usr/bin/start-install.sh
  install -D -m 644 %{SOURCE14} usr/share/applications/live-installer.desktop
  mkdir -p var/lib/zypp/
  echo livecd-$desktop > var/lib/zypp/LastDistributionFlavor

  if test -f $plfile; then
    mkdir -p var/cache/preload
    gzip -c $plfile > var/cache/preload/trace.gz


mkdir -p %{buildroot}/usr/share/openSUSE-kiwi
mv * %{buildroot}/usr/share/openSUSE-kiwi
install -m 644 -D %{SOURCE1} %{buildroot}/%_docdir/%name/COPYING
install -m 644 -D %{SOURCE10} %{buildroot}/%_docdir/%name/README
%fdupes %{buildroot}/usr/share/openSUSE-kiwi

%defattr(-, root, root)
%doc %_docdir/%name