Basicalky what you are missing, in the spec file: if the tar.gz file in SOURCES is myfile.tar.gz Source: myfile.tar.gz
%prep #This section will remove previous version of your package and will unpack a new version from your myfile.tar.gz rm -rf $RPM_BUILD_DIR/cdplayer-1.0 zcat $RPM_SOURCE_DIR/cdplayer-1.0.tgz | tar -xvf -
%prep %setup
%build make %install make install
%files ?
%pre %post %preun %postun
rpm -ba cdplayer-1.0.spec