~ubuntu-branches/debian/sid/rpm/sid

« back to all changes in this revision

Viewing changes to tests/data/SPECS/replacetest.spec

  • Committer: Package Import Robot
  • Author(s): Michal Čihař
  • Date: 2013-06-06 11:39:34 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20130606113934-ela3du14fyba0t6u
Tags: 4.11.0.1-1
* New upstream release.
* Bump standards to 3.9.4.
* Refresh patches, update patch from Fedora.
* Build with Lua 5.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%{!?filetype: %global filetype file}
 
2
%{?fixit: %global havepretrans 1}
 
3
 
 
4
Name:           replacetest%{?sub:-%{sub}}
 
5
Version:        %{ver}
 
6
Release:        1
 
7
Summary:        Testing file replacement behavior
 
8
 
 
9
Group:          Testing
 
10
License:        GPL
 
11
BuildArch:      noarch
 
12
 
 
13
%description
 
14
%{summary}
 
15
 
 
16
%install
 
17
rm -rf $RPM_BUILD_ROOT
 
18
mkdir -p $RPM_BUILD_ROOT/opt
 
19
case %{filetype} in
 
20
file)
 
21
    echo "%{filedata}" > $RPM_BUILD_ROOT/opt/foo
 
22
    ;;
 
23
link)
 
24
    ln -s "%{filedata}" $RPM_BUILD_ROOT/opt/foo
 
25
    ;;
 
26
dir)
 
27
    mkdir -p $RPM_BUILD_ROOT/opt/foo
 
28
    ;;
 
29
datadir)
 
30
    mkdir -p $RPM_BUILD_ROOT/opt/foo
 
31
    echo WOOT > $RPM_BUILD_ROOT/opt/foo/%{filedata}
 
32
    ;;
 
33
esac
 
34
mkdir -p $RPM_BUILD_ROOT/opt/zoo
 
35
echo FOO > $RPM_BUILD_ROOT/opt/goo
 
36
 
 
37
%clean
 
38
rm -rf $RPM_BUILD_ROOT
 
39
 
 
40
%if 0%{?havepretrans}
 
41
%pretrans -p <lua>
 
42
%{fixit}
 
43
%endif
 
44
 
 
45
%files
 
46
%defattr(-,root,root,-)
 
47
/opt/*