File hello_world.spec of Package hello_world
Name: hello_world
Version: 1.0
Release: 42
Source1: hello_world.c
Summary: %{name}
License: GPL
Group: Example
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
%prep
%setup -q -c -T
pwd
id
%build
env
set
gcc $RPM_OPT_FLAGS -Wall -o hello_world %{S:1}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -vp $RPM_BUILD_ROOT/usr/bin
cp -av hello_world $RPM_BUILD_ROOT/usr/bin/%{name}
ascii="`$(type -P echo) -e '\xc3\xa8'`"
ln -fvbn %{name} "$RPM_BUILD_ROOT/usr/bin/%{name}.${ascii}"
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
/usr/bin/*