summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/SPECS/configtest.spec16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/data/SPECS/configtest.spec b/tests/data/SPECS/configtest.spec
index 844e9eba4..e9b72c093 100644
--- a/tests/data/SPECS/configtest.spec
+++ b/tests/data/SPECS/configtest.spec
@@ -1,3 +1,5 @@
+%{!?filetype: %global filetype file}
+
Name: configtest%{?sub:-%{sub}}
Version: %{ver}
Release: 1
@@ -13,11 +15,21 @@ BuildArch: noarch
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
-echo "%{filedata}" > $RPM_BUILD_ROOT/%{_sysconfdir}/my.conf
+case %{filetype} in
+file)
+ echo "%{filedata}" > $RPM_BUILD_ROOT/%{_sysconfdir}/my.conf
+ ;;
+link)
+ ln -s "%{filedata}" $RPM_BUILD_ROOT/%{_sysconfdir}/my.conf
+ ;;
+dir)
+ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/my.conf
+ ;;
+esac
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%config%{?noreplace:(noreplace)} %{_sysconfdir}/my.conf
+%{!?noconfig:%config%{?noreplace:(noreplace)}} %{_sysconfdir}/my.conf