When an RPM update is performed, a file marked as %config is replaced with the new version, but the old version is saved as <filename>.rpmsave . Files marked as %config(noreplace) are not replaced; the new version of the config file is instead installed as <filename>.rpmnew .

In the case of CriticalMass, there are no configuration files installed by the RPM. 

The whole %files section looks like this:

%files

%doc COPYING TODO

./usr/bin/Packer

./usr/bin/critter

./usr/share/man/man6/critter.6.gz

./usr/share/Critical_Mass

You can simplify this a bit by using ambiguous pathnames and macros:

%files

%doc COPYING TODO

%{_bindir}/*

%{_datadir}/Critical_Mass

%{_mandir}/man?/*

Finally, the %changelog section contains entries describing the changes that have been made to the RPM spec file (and, if desired, to the underlying software as well). The entries are placed in reverse chronological ordernewest firstand each entry takes the form:

* WWW MMM DD YYYY email version

- point form note

- another point  

with the meaning:

WWW MMM DD YYYY

The date, such as Sat Jan 1 2006 .

email

The name and email address of the person who made the change, such as Chris Tyler <[email protected]>

version

The version number in which the change was made (optional).

For example:

%changelog

* Mon Nov 7 2005 Chris Tyler <[email protected]> 1.0.0-2

- Improved summary

* Sat Nov 5 2005 Chris Tyler <[email protected]>

- Initial RPM package.

Putting all of this together, the final spec file looks like this (note that I've incremented the release number to be consistent with the information in the %changelog section):

Name: CriticalMass

Version: 1.0.0

Release: 2

Group: Amusements/Games

Summary: An arcade-style shoot-em-up game.

License: GPL

Source0: CriticalMass-1.0.0.tar.bz2

URL: http://sourceforge.net/projects/criticalmass

BuildRoot: %{_tmppath}/%{name}-root

%description

CriticalMass is an old-style arcade-style shoot-em-up game with modern graphics and sound.

%prep

%setup -q

%build

%configure

make %{_smp_mflags}

%install

rm -rf %{buildroot}

%makeinstall

%clean

rm -rf %{buildroot}

%files

%defattr(-, root, root)

%doc COPYING TODO

%{_bindir}/*

%{_datadir}/Critical_Mass

%{_mandir}/man?/*

%changelog

* Mon Nov 7 2005 Chris Tyler <[email protected]> 1.0.0-2

- Improved summary

* Sat Nov 5 2005 Chris Tyler <[email protected]>

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату