Rev openSUSE:Tools/314 Md5 c0e0efb1c749d72cfaf8367f45fe20c0 2017-07-20 16:29:47 adrianSuSE None
This commit is contained in:
OBS User adrianSuSE
2017-07-20 16:29:47 +00:00
committed by Git OBS Bridge
parent 10bd24a714
commit 0fd8ec5014
8 changed files with 45 additions and 30 deletions

View File

@@ -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: 20170719
Version: 20170720
Release: 0
Source: obs-build-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -135,20 +135,44 @@ chmod 0644 $RPM_BUILD_ROOT/usr/lib/build/initvm.*
# main
make DESTDIR=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT/usr/lib/build/configs/
%if "0%{?suse_version}" == "1315" && 0%{?is_opensuse}
# super special leap distro
ln -s sl42.1.conf default.conf
%else
# tweak default config on suse
%if 0%{?suse_version}
%if 0%{?sles_version}
ln -s sles%{sles_version}.conf default.conf
%else
V=%suse_version
ln -s sl${V:0:2}.${V:2:1}.conf default.conf
cd $RPM_BUILD_ROOT/usr/lib/build/configs/
SUSE_V=%{?suse_version}
SLE_V=%{?sle_version}
%if 0%{?sle_version} && 0%{?is_opensuse} && %suse_version == 1315
# this is SUSE Leap 42.X
ln -s sl42.${SLE_V:3:1}.conf default.conf
%endif
%if 0%{?sle_version} && 0%{?is_opensuse} && %suse_version > 1315
# this is SUSE Leap 15 and higher
ln -s sl${SLE_V:0:2}.${SLE_V:3:1}.conf default.conf
%endif
%if !0%{?sle_version} && 0%{?is_opensuse}
# this is old openSUSE releases and Factory
ln -s sl${SUSE_V:0:2}.${SUSE_V:2:1}.conf default.conf
%endif
%if 0%{?sle_version} && !0%{?is_opensuse}
# this is SUSE SLE 12 and higher
ln -s sle${SLE_V:0:2}.${SLE_V:3:1}.conf default.conf
%endif
# make sure that we have a config
test -e default.conf || exit 1
%endif
# tweak baselibs config on suse
%if 0%{?suse_version}
cd $RPM_BUILD_ROOT/usr/lib/build
%if %suse_version == 1500
# SLE 15 / Leap 15
ln -sf baselibs_configs/baselibs_global-sle15.conf baselibs_global.conf
%endif
%if %suse_version <= 1315
# SLE 12 / Leap 42 and older
ln -sf baselibs_configs/baselibs_global-sle12.conf baselibs_global.conf
%endif
test -e baselibs_global.conf || exit 1
%endif
%check