blob: 579f690d5db2a1ca1faa1c99aa1e7183a728c44f (
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
|
Summary: x
Name: p
Version: 2
Release: 1
License: 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
|