summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/buildroot_default.spec
blob: 11d2f6869692aff2571d1f84986620fc3261d6a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%define macro_using_buildroot $(echo %buildroot)

Summary: x
Name: buildroot
Version: 1
Release: 1
License: x
Group: x
Url: x

%description
x

%package sub

Summary: x
Group: x
Version: 2
Release: 2

%description sub
x

%install
wanted=$(echo %{_buildrootdir}/buildroot-1-1.%{_arch} | sed 's!//!/!')
[ "%buildroot" = $wanted ] || { echo "buildroot should be $wanted instead of %buildroot"; exit 1; }
[ "$RPM_BUILD_ROOT" = $wanted ] || { echo "RPM_BUILD_ROOT should be $wanted instead of $RPM_BUILD_ROOT"; exit 1; }
[ "%macro_using_buildroot" = $wanted ] || { echo "macro_using_buildroot should be $wanted instead of %buildroot"; exit 1; }

install -d $RPM_BUILD_ROOT/etc
echo foo > $RPM_BUILD_ROOT/etc/foo

%files
/etc/foo