summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/ordering-scriptlets/a_1.spec
blob: acaa184d91279e540da692408f0e67f79c350211 (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
# fix warnings:
%define debug_package %{nil}

Summary: x
Name: a
Version: 1
Release: 1
License: x
Group: x
Url: x
Provides: /bin/a
BuildRequires: gcc
BuildRoot: %{_tmppath}/%{name}

%prep
%setup -c -T
cat <<EOF > a.c 
#include <stdio.h>
int main(int argc, char **argv) { 
   FILE *f = fopen(argv[1], "r");
   int c; 
   while ((c = getc(f)) > 0) putchar(c); 
   putchar('\n');
   return 0;
}
EOF

%build
gcc -Wall -static -o a a.c

%install
rm -rf $RPM_BUILD_ROOT
install -D a $RPM_BUILD_ROOT/bin/a

%clean
rm -rf $RPM_BUILD_ROOT

%description
x

%files
%defattr(-,root,root)
/bin/*