summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/file-conflicts/p-2.spec
blob: 2e47208ad5534e46cc1413cdff5ae067bcae8403 (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
Summary: x
Name: p
Version: 2
Release: 1
License: x
Group: x
BuildArch: noarch

%description
x

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/foo
install -d $RPM_BUILD_ROOT/var
echo bar > $RPM_BUILD_ROOT/etc/foo/bar
echo boo > $RPM_BUILD_ROOT/etc/foo/boo
ln -s ../etc/foo $RPM_BUILD_ROOT/var/foo

%clean
rm -rf $RPM_BUILD_ROOT

%pretrans
if [ ! -L /var/foo ]; then
   echo "handling by hand /var/foo migration"
   mv /var/foo/* /etc/foo/
   rmdir /var/foo
   ln -s ../etc/foo /var/foo
fi

%files
/etc/foo
/var/foo