Adrian Schröter 2020-02-03 09:48:14 +00:00 committed by Git OBS Bridge
parent 7c12216bab
commit ef3aeb1f06

View File

@ -50,11 +50,13 @@ BuildRequires: tar
%if 0%{?fedora}
Requires: perl-MD5
Requires: perl-TimeDate
BuildRequires: perl-TimeDate
%endif
Conflicts: bsdtar < 2.5.5
%if 0%{?suse_version} > 1000
# None of them are actually required for core features.
# Perl helper scripts use them.
BuildRequires: perl(Date::Parse)
Recommends: perl(Date::Language)
Recommends: perl(Date::Parse)
Recommends: perl(LWP::UserAgent)
@ -199,12 +201,16 @@ test -e baselibs_global.conf || exit 1
%check
for i in build build-* ; do bash -n $i || exit 1 ; done
# expect unit tests
LANG=C prove -I. -v t/*.t
if [ `whoami` != "root" ]; then
echo "WARNING: Not building as root, tests did not run!"
echo "WARNING: Not building as root, build test did not run!"
exit 0
fi
if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]; then
echo "WARNING: No default config, tests did not run!"
echo "WARNING: No default config, build test did not run!"
exit 0
fi
# get back the default.conf link
@ -213,6 +219,8 @@ cp -av %{buildroot}/usr/lib/build/configs/default.conf configs/
export BUILD_IGNORE_2ND_STAGE=1
# use our own build code
export BUILD_DIR=$PWD
# simple chroot build test
cd test
# target is autodetected
%if 0%{?sles_version}