File systemd-presets-branding-CAASP.spec of Package systemd-presets-branding-CAASP
#
# spec file for package systemd-presets-branding-CAASP
#
# 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/
#
%if 0%{?is_susecaasp} || 0%{?sle_version} > 0
%define theme SLE
%else
%define theme openSUSE
%define generic_name systemd-presets-branding
%define systemd_preset_pre if [ $1 -gt 1 -a -x %{_prefix}/lib/%{generic_name}/branding-preset-states ] ; then \
%{_prefix}/lib/%{generic_name}/branding-preset-states save \
fi
%define systemd_preset_post if [ $1 -gt 1 ] ; then \
%{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes \
fi
%define systemd_preset_posttrans /bin/true
%endif
Name: systemd-presets-branding-CAASP
Version: 12.2
Release: 0
Summary: Systemd default presets for SUSE CaaS Platform
License: MIT
Group: System/Base
Source0: 70-default-CAASP.preset
Source1: 99-default-disable.preset
BuildRequires: systemd
BuildRequires: systemd-presets-branding-%theme
#!BuildIgnore: systemd-presets-branding
PreReq: coreutils
Provides: systemd-presets-branding = %{version}
Supplements: packageand(systemd:branding-CAASP)
Conflicts: otherproviders(systemd-presets-branding)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Default presets for systemd on SUSE Containers as a Service Platform.
%prep
%setup -q -T -c
%build
%install
mkdir -p %{buildroot}/usr/lib/systemd/system-preset
install -m644 %{SOURCE0} %{buildroot}/usr/lib/systemd/system-preset/
install -m644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system-preset/
# Copy default presets
install -m644 /usr/lib/systemd/system-preset/90-default-%theme.preset %{buildroot}/usr/lib/systemd/system-preset/
%pre -p /bin/bash
%systemd_preset_pre
%post
systemctl daemon-reload >/dev/null 2>&1 || :
%postun
if [ $1 -eq 0 ]; then
systemctl daemon-reload >/dev/null 2>&1 || :
fi
%posttrans -p /bin/bash
%systemd_preset_posttrans
%files
%defattr(-,root,root)
/usr/lib/systemd/system-preset/*
%changelog