Rev openSUSE:Tools/345 Md5 a0eab0879ddb70a83af55aa10f089152 2018-01-23 14:05:54 adrianSuSE None
This commit is contained in:
OBS User adrianSuSE
2018-01-23 14:05:54 +00:00
committed by Git OBS Bridge
parent 6e0ead3ba5
commit c87575f58e
8 changed files with 34 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package build
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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
@@ -22,7 +22,7 @@ Name: build
Summary: A Script to Build SUSE Linux RPMs
License: GPL-2.0+ and GPL-2.0
Group: Development/Tools/Building
Version: 20171128
Version: 20180123
Release: 0
Source: obs-build-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -124,18 +124,18 @@ make CFLAGS="$RPM_BUILD_FLAGS" initvm-all
%install
# initvm
%if 0%{?suse_version}
make DESTDIR=$RPM_BUILD_ROOT initvm-install
strip $RPM_BUILD_ROOT/usr/lib/build/initvm.*
make DESTDIR=%{buildroot} initvm-install
strip %{buildroot}/usr/lib/build/initvm.*
export NO_BRP_STRIP_DEBUG="true"
chmod 0644 $RPM_BUILD_ROOT/usr/lib/build/initvm.*
chmod 0644 %{buildroot}/usr/lib/build/initvm.*
%endif
# main
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# tweak default config on suse
%if 0%{?suse_version}
cd $RPM_BUILD_ROOT/usr/lib/build/configs/
cd %{buildroot}/usr/lib/build/configs/
SUSE_V=%{?suse_version}
SLE_V=%{?sle_version}
%if 0%{?sle_version} && 0%{?is_opensuse} && %suse_version == 1315
@@ -164,7 +164,7 @@ test -e default.conf || exit 1
# tweak baselibs config on suse
%if 0%{?suse_version}
cd $RPM_BUILD_ROOT/usr/lib/build
cd %{buildroot}/usr/lib/build
%if %suse_version == 1500
# SLE 15 / Leap 15
ln -sf baselibs_configs/baselibs_global-sle15.conf baselibs_global.conf
@@ -181,12 +181,12 @@ if [ `whoami` != "root" ]; then
echo "WARNING: Not building as root, tests did not run!"
exit 0
fi
if [ ! -f "$RPM_BUILD_ROOT/usr/lib/build/configs/default.conf" ]; then
if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]; then
echo "WARNING: No default config, tests did not run!"
exit 0
fi
# get back the default.conf link
cp -av $RPM_BUILD_ROOT/usr/lib/build/configs/default.conf configs/
cp -av %{buildroot}/usr/lib/build/configs/default.conf configs/
# do not get confused when building this already with build:
export BUILD_IGNORE_2ND_STAGE=1
# use our own build code