blob: e8a64e8034ada55aed8d7988b309c7b01fb8c7ec (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
|
%{!?filetype: %global filetype file}
%{?fixit: %global havepretrans 1}
Name: replacetest%{?sub:-%{sub}}
Version: %{ver}
Release: 1
Summary: Testing file replacement behavior
Group: Testing
License: GPL
BuildArch: noarch
%description
%{summary}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt
case %{filetype} in
file)
echo "%{filedata}" > $RPM_BUILD_ROOT/opt/foo
;;
link)
ln -s "%{filedata}" $RPM_BUILD_ROOT/opt/foo
;;
dir)
mkdir -p $RPM_BUILD_ROOT/opt/foo
;;
datadir)
mkdir -p $RPM_BUILD_ROOT/opt/foo
echo WOOT > $RPM_BUILD_ROOT/opt/foo/%{filedata}
;;
esac
mkdir -p $RPM_BUILD_ROOT/opt/zoo
echo FOO > $RPM_BUILD_ROOT/opt/goo
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{?havepretrans}
%pretrans -p <lua>
%{fixit}
%endif
%files
%defattr(-,root,root,-)
/opt/*
|