View Single Post
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#3
Originally Posted by nieldk View Post
Basicalky what you are missing, in the spec file:

if the tar.gz file in SOURCES is myfile.tar.gz

Source: myfile.tar.gz
It's not only Source: myfile.tar.gz... From what I have read, for example here: http://www.rpm.org/max-rpm/s1-rpm-bu...spec-file.html Almost all sections under %description is completely different from my .spec file... This is a reason that I asked for a template that should work at least in most cases... And if possible with description like:
Code:
%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 -
or it should be:
Code:
%prep
%setup
?

And so on...
Code:
%build
make 

%install
make install
And what I need to write under %files section ?:
Code:
%files
?
And what with Install/Uninstall Scripts ? where I need put them ? under which section ? If need it at all ? How to know if need to be here ?
Code:
%pre

%post

%preun

%postun
The %clean Section.. Need or not ? How I know what to write here ?

%changelog, under or before %clean Section ?

After this a creating rpm ?
Code:
rpm -ba cdplayer-1.0.spec
 

The Following User Says Thank You to Schturman For This Useful Post: