summaryrefslogtreecommitdiff
path: root/tests/data/SPECS/hlinktest.spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data/SPECS/hlinktest.spec')
-rw-r--r--tests/data/SPECS/hlinktest.spec16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/data/SPECS/hlinktest.spec b/tests/data/SPECS/hlinktest.spec
index 7c22d29ae..b3b8866fc 100644
--- a/tests/data/SPECS/hlinktest.spec
+++ b/tests/data/SPECS/hlinktest.spec
@@ -1,3 +1,6 @@
+%bcond_with unpackaged_dirs
+%bcond_with unpackaged_files
+
Summary: Testing hard link behavior
Name: hlinktest
Version: 1.0
@@ -5,6 +8,7 @@ Release: 1
License: Testing
Group: Testing
BuildArch: noarch
+Provides: /bin/sh
%description
%install
@@ -12,16 +16,26 @@ rm -rf %{buildroot}
mkdir -p $RPM_BUILD_ROOT/foo
cat << EOF >> $RPM_BUILD_ROOT/foo/hello
#!/bin/sh
-echo $0
+echo %{name}-%{version}
EOF
cd $RPM_BUILD_ROOT/foo
cat hello > copyllo
+cat hello > aaaa
+ln aaaa zzzz
chmod a+x hello copyllo
for f in foo bar world; do
ln hello hello-${f}
done
+%if %{with unpackaged_dirs}
+mkdir -p $RPM_BUILD_ROOT/zoo/
+%endif
+
+%if %{with unpackaged_files}
+touch $RPM_BUILD_ROOT/toot
+%endif
+
%files
%defattr(-,root,root)
/foo/*