summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/buildroot_default.spec
diff options
context:
space:
mode:
Diffstat (limited to 't/data/SPECS/buildroot_default.spec')
-rw-r--r--t/data/SPECS/buildroot_default.spec32
1 files changed, 32 insertions, 0 deletions
diff --git a/t/data/SPECS/buildroot_default.spec b/t/data/SPECS/buildroot_default.spec
new file mode 100644
index 00000000..1924e847
--- /dev/null
+++ b/t/data/SPECS/buildroot_default.spec
@@ -0,0 +1,32 @@
+%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=%defaultbuildroot
+[ "%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
+
+%files