Name: bloodyobvious Version: 1 Release: 1 Summary: Specfile to demonstrate the bloody obvious, which was strangely requested of me. Group: Development/Tools License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel %description Needs zlib-devel.%{ARCH} to build. %prep rm -rf %{name}-%{version} mkdir %{name}-%{version} cd %{name}-%{version} cat > foo.c < #include int main(void) { z_stream foo; inflateInit(&foo); return 0; } EOF %build cd %{name}-%{version} gcc -o foo foo.c $RPM_OPT_FLAGS -lz %install cd %{name}-%{version} rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/bin install -m0755 foo $RPM_BUILD_ROOT/usr/bin/foo %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) /usr/bin/foo %changelog