12
0
2017-03-02 09:11:56 +00:00
committed by Git OBS Bridge
parent cb69cf6f40
commit d7b9ea59c5
2 changed files with 27 additions and 3 deletions

View File

@@ -29,7 +29,7 @@
# === sort out branding ===
%if 0%{?is_opensuse}
%define theme openSUSE
%define product_name %{theme}-%{_target_cpu}
%define product_nameX %{theme}-%{_target_cpu}
%define branding_skelcd openSUSE
%define branding_systemd openSUSE
%define branding_plymouth openSUSE
@@ -42,7 +42,7 @@ BuildRequires: xf86-input-libinput
%else
%if 0%{?is_susecaasp}
%define theme CAASP
%define product_name %{theme}-%{_target_cpu}
%define product_nameX %{theme}-%{_target_cpu}
%define branding_skelcd CASP
%define branding_systemd CAASP
%define branding_plymouth SLE
@@ -53,7 +53,7 @@ BuildRequires: caasp-release
BuildRequires: caasp-release-DVD
%else
%define theme SLES
%define product_name %{theme}-%{_target_cpu}
%define product_nameX %{theme}-%{_target_cpu}
%define branding_skelcd SLES
%define branding_systemd SLE
%define branding_plymouth SLE
@@ -71,6 +71,8 @@ BuildRequires: sap-installation-wizard
%endif
%endif
%global product_name %(bash %_sourcedir/product_name)-%{_target_cpu}
BuildRequires: skelcd-control-%branding_skelcd
BuildRequires: systemd-presets-branding-%branding_systemd
%if %with_plymouth
@@ -430,6 +432,7 @@ Release: 0
Provides: installation-images-%theme = %version-%release
Source: %{name}-%{version}.tar.xz
Source1: %{name}-rpmlintrc
Source2: product_name
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define _binary_payload w.ufdio
@@ -481,6 +484,7 @@ Package that holds debuginfo dependencies for image files in installation-image.
rm -f /usr/lib/build/checks/04-check-filelist
%build
echo building product "'%product_name'"
unset MALLOC_CHECK_
BUILD_DISTRIBUTION_NAME="%distribution"
export BUILD_DISTRIBUTION_NAME

20
product_name Normal file
View File

@@ -0,0 +1,20 @@
#! /bin/bash
# print product name
if [ -f /usr/lib/os-release ] ; then
. /usr/lib/os-release
else
. /etc/os-release
fi
prod="$NAME"
[ -n "$VERSION" ] && prod="$prod-$VERSION"
# kill parentheses...
prod=${prod//[()]/}
# ... and spaces
prod=${prod// /-}
echo $prod