301 lines
8.7 KiB
RPMSpec
301 lines
8.7 KiB
RPMSpec
#
|
|
# spec file for package branding-SLE
|
|
#
|
|
# Copyright (c) 2016 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: branding-SLE
|
|
Version: 15
|
|
Release: 0
|
|
Provides: branding
|
|
Conflicts: otherproviders(branding)
|
|
Url: http://github.com/openSUSE/branding
|
|
Source0: SLE.tar.xz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%ifarch x86_64 %ix86
|
|
%define package_gfxboot 1
|
|
BuildRequires: gfxboot-devel
|
|
%endif
|
|
%ifarch aarch64 %{ix86} x86_64 ppc ppc64 ppc64le
|
|
%define package_grub2_theme 1
|
|
%endif
|
|
Summary: SLE Brand File
|
|
License: BSD-3-Clause
|
|
Group: System/Fhs
|
|
BuildRequires: fdupes
|
|
BuildRequires: fribidi
|
|
BuildRequires: update-desktop-files
|
|
BuildArch: noarch
|
|
BuildRequires: update-bootloader-rpm-macros
|
|
|
|
%description
|
|
This package contains the file /etc/SUSE-brand, and its name is used as
|
|
a trigger for installation of correct vendor brand packages.
|
|
|
|
%define theme_name SLE
|
|
|
|
%if 0%{?package_gfxboot} > 0
|
|
|
|
%package -n gfxboot-branding-SLE
|
|
Summary: Graphical bootloader SLE theme
|
|
License: BSD-3-Clause
|
|
Group: System/Boot
|
|
PreReq: gfxboot >= 4
|
|
Supplements: packageand(gfxboot:branding-SLE)
|
|
Provides: gfxboot-branding = %{version}
|
|
Provides: gfxboot-theme = %{version}
|
|
Conflicts: otherproviders(gfxboot-branding)
|
|
BuildArch: noarch
|
|
Obsoletes: gfxboot-branding-SLED < 12
|
|
Obsoletes: gfxboot-branding-SLES < 12
|
|
|
|
%description -n gfxboot-branding-SLE
|
|
SUSE Linux Enterprise theme for gfxboot (graphical bootloader for grub).
|
|
%endif
|
|
|
|
%package -n wallpaper-branding-SLE
|
|
Summary: SLE default wallpapers
|
|
License: BSD-3-Clause
|
|
Group: System/Fhs
|
|
Provides: wallpaper-branding = %{version}
|
|
Conflicts: otherproviders(wallpaper-branding)
|
|
BuildArch: noarch
|
|
|
|
%description -n wallpaper-branding-SLE
|
|
SUSE Linux Enterprise defaults wallpapers
|
|
|
|
%if 0%{?package_grub2_theme} > 0
|
|
|
|
%package -n grub2-branding-SLE
|
|
Summary: SLE branding for GRUB2's graphical console
|
|
License: CC-BY-SA-3.0
|
|
Group: System/Fhs
|
|
Requires: grub2
|
|
Provides: grub2-branding = %{version}
|
|
Supplements: packageand(grub2:branding-SLE)
|
|
Conflicts: otherproviders(grub2-branding)
|
|
BuildArch: noarch
|
|
|
|
%description -n grub2-branding-SLE
|
|
SUSE Linux Enterprise branding for the GRUB2's graphical console
|
|
|
|
%endif
|
|
|
|
%package -n plymouth-branding-SLE
|
|
Summary: SLE branding for Plymouth bootsplash
|
|
License: GPL-2.0+
|
|
Group: System/Fhs
|
|
Requires: plymouth-plugin-label
|
|
PreReq: plymouth-plugin-script
|
|
PreReq: plymouth-scripts
|
|
Supplements: packageand(plymouth:branding-SLE)
|
|
Provides: plymouth-branding = %{version}
|
|
Conflicts: otherproviders(plymouth-branding)
|
|
BuildArch: noarch
|
|
|
|
%description -n plymouth-branding-SLE
|
|
SUSE Linux Enterprise branding for the plymouth bootsplash
|
|
|
|
%package -n gdm-branding-SLE
|
|
Summary: SLE branding for gdm
|
|
# To be in sync with upstream defaults, do branding as a patch for upstream file.
|
|
# WARNING: As this package conflicts with gdm-branding-openSUSE, you cannot
|
|
# reuse build root. You have to build in a clean build root every time!
|
|
License: GPL-2.0+
|
|
Group: System/GUI/GNOME
|
|
BuildRequires: gdm-branding-upstream
|
|
# For directory ownership:
|
|
BuildRequires: gdm
|
|
%define gdm_version %(rpm -q --qf '%%{version}' gdm)
|
|
Requires: gdm = %{gdm_version}
|
|
Requires: gdm = %{gdm_version}
|
|
Provides: gdm-branding = %{gdm_version}
|
|
Conflicts: otherproviders(gdm-branding)
|
|
Supplements: packageand(gdm:branding-SLE)
|
|
BuildArch: noarch
|
|
|
|
%description -n gdm-branding-SLE
|
|
SUSE Linux Enterprise branding for the gdm
|
|
|
|
%prep
|
|
%setup -q -c
|
|
cp -a SLE/LICENSE COPYING
|
|
|
|
%build
|
|
cat >SUSE-brand <<EOF
|
|
SLE
|
|
VERSION = %{version}
|
|
EOF
|
|
|
|
%if 0%{?package_gfxboot} > 0
|
|
mkdir gfx
|
|
cp -a /usr/share/gfxboot/themes/openSUSE/ gfx/SLE
|
|
list=`cd SLE/gfxboot && find -type f`
|
|
for i in $list; do
|
|
cp SLE/gfxboot/$i gfx/SLE/$i
|
|
done
|
|
pushd gfx/SLE
|
|
sed -i -e "s,product=.*,product=SUSE Linux Enterprise %{version}," config
|
|
sed -i -e "s,penguin=.*,penguin=0," src/gfxboot.cfg
|
|
|
|
export PATH=/usr/sbin:$PATH
|
|
make
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{_sysconfdir}
|
|
cp SUSE-brand %{buildroot}%{_sysconfdir}/
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/gdm/greeter/images/
|
|
mkdir -p %{buildroot}%{_sysconfdir}/gdm
|
|
install -m0644 SLE/gdm/custom.conf %{buildroot}%{_sysconfdir}/gdm/custom.conf
|
|
install -m0644 SLE/gdm/distributor.svg %{buildroot}%{_datadir}/gdm/greeter/images/
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/gnome-shell/theme/
|
|
install -m0644 SLE/gdm/SLE-background.png %{buildroot}%{_datadir}/gnome-shell/theme/
|
|
|
|
# gfxboot themes will soon get a make install - promised by snwint
|
|
# gfxboot should use a link /etc/bootsplash/theme -> /usr/share/bootsplash
|
|
# like splashy
|
|
if test -f gfx/SLE/bootlogo; then
|
|
install -d -m 755 %{buildroot}/etc/bootsplash/themes/SLE/{bootloader,cdrom}
|
|
cp gfx/SLE/bootlogo %{buildroot}/etc/bootsplash/themes/SLE/cdrom
|
|
/usr/share/gfxboot/bin/unpack_bootlogo %{buildroot}/etc/bootsplash/themes/SLE/cdrom
|
|
install -m 644 gfx/SLE/{message,po/*.tr,help-boot/*.hlp} %{buildroot}/etc/bootsplash/themes/SLE/bootloader
|
|
/usr/share/gfxboot/bin/2hl --link --quiet %{buildroot}/etc/bootsplash/themes/SLE/*
|
|
mkdir %{buildroot}/boot
|
|
touch %{buildroot}/boot/message
|
|
fi
|
|
|
|
make -C SLE install DESTDIR=%{buildroot}
|
|
|
|
# no longer uses alternative
|
|
ln -s -f SLE-default-static.xml %{buildroot}%{_datadir}/wallpapers/SLE-default.xml
|
|
|
|
%fdupes %{buildroot}/usr/share/backgrounds
|
|
|
|
# remove
|
|
%if 0%{?package_grub2_theme} < 1
|
|
rm -rf %{buildroot}/%{_datadir}/grub2
|
|
%endif
|
|
|
|
%check
|
|
make -C SLE check DESTDIR=%{buildroot}
|
|
|
|
|
|
%if 0%{?package_gfxboot} > 0
|
|
|
|
%post -n gfxboot-branding-SLE
|
|
gfxboot --update-theme SLE
|
|
%endif
|
|
|
|
%post -n wallpaper-branding-SLE
|
|
# remove alternative leftover
|
|
if [ $1 -gt 1 ]; then
|
|
[ -r /etc/alternatives/SLE-default.xml ] && rm -f /etc/alternatives/SLE-default.xml || true
|
|
fi
|
|
|
|
%if 0%{?package_grub2_theme} > 0
|
|
%post -n grub2-branding-SLE
|
|
%{_datadir}/grub2/themes/%theme_name/activate-theme
|
|
%if 0%{?update_bootloader_check_type_refresh_post:1}
|
|
%{update_bootloader_check_type_refresh_post grub2 grub2-efi}
|
|
%else
|
|
if test -e /boot/grub2/grub.cfg ; then
|
|
%{_sbindir}/grub2-mkconfig -o /boot/grub2/grub.cfg || true
|
|
fi
|
|
%endif
|
|
|
|
%posttrans -n grub2-branding-SLE
|
|
%{?update_bootloader_posttrans}
|
|
|
|
%postun -n grub2-branding-SLE
|
|
if [ $1 = 0 ] ; then
|
|
rm -rf /boot/grub2/themes/%theme_name
|
|
fi
|
|
%endif
|
|
|
|
%post -n plymouth-branding-SLE
|
|
export LIB=%{_libdir}
|
|
OTHEME="$(%{_sbindir}/plymouth-set-default-theme)"
|
|
if [ "$OTHEME" == "text" -o "$OTHEME" == "SLE" -o "$OTHEME" == "basedonopensuse" ]; then
|
|
if [ ! -e /.buildenv ]; then
|
|
%{_sbindir}/plymouth-set-default-theme SLE
|
|
%{?regenerate_initrd_post}
|
|
else
|
|
%{_sbindir}/plymouth-set-default-theme SLE
|
|
fi
|
|
fi
|
|
|
|
%postun -n plymouth-branding-SLE
|
|
if [ $1 -eq 0 ]; then
|
|
export LIB=%{_libdir}
|
|
if [ "$(%{_sbindir}/plymouth-set-default-theme)" == "SLE" ]; then
|
|
%{_sbindir}/plymouth-set-default-theme --reset
|
|
%{?regenerate_initrd_post}
|
|
fi
|
|
fi
|
|
|
|
%posttrans -n plymouth-branding-SLE
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%license COPYING
|
|
%{_sysconfdir}/SUSE-brand
|
|
|
|
%if 0%{?package_gfxboot} > 0
|
|
|
|
%files -n gfxboot-branding-SLE
|
|
%defattr(-,root,root)
|
|
%{_sysconfdir}/bootsplash
|
|
%ghost /boot/message
|
|
%endif
|
|
|
|
%files -n wallpaper-branding-SLE
|
|
%defattr(-,root,root)
|
|
%license COPYING
|
|
/usr/share/gnome-background-properties/wallpaper-branding-SLE.xml
|
|
/usr/share/wallpapers/
|
|
# FIXME: It should be owned by a different package:
|
|
%dir /usr/share/gnome-background-properties/
|
|
|
|
%if 0%{?package_grub2_theme} > 0
|
|
%files -n grub2-branding-SLE
|
|
%defattr(-,root,root)
|
|
%{_datadir}/grub2
|
|
%dir /boot/grub2
|
|
%dir /boot/grub2/backgrounds
|
|
%dir /boot/grub2/themes
|
|
%ghost /boot/grub2/backgrounds/SLE
|
|
%ghost /boot/grub2/themes/SLE
|
|
%endif
|
|
|
|
%files -n plymouth-branding-SLE
|
|
%defattr(-, root, root)
|
|
%{_datadir}/plymouth/plymouthd.defaults
|
|
%{_datadir}/plymouth/themes/SLE/
|
|
|
|
%files -n gdm-branding-SLE
|
|
%defattr (-, root, root)
|
|
%config(noreplace) %{_sysconfdir}/gdm/custom.conf
|
|
%{_datadir}/gdm/greeter/images/distributor.svg
|
|
%dir %{_datadir}/gdm/greeter/images/
|
|
%{_datadir}/gnome-shell/theme/SLE-background.png
|
|
%dir %{_datadir}/gnome-shell/theme/
|
|
|
|
%changelog
|