- Initial RPM package.

To build the final RPM package, use buildrpm with the -ba option (build all):

$ cd ~/rpm/ CriticalMass

$ rpmbuild -ba CriticalMass.spec

Executing(%prep): /bin/sh -e /home/chris/rpm/tmp/rpm-tmp.61308

+ umask 022

+ cd /home/chris/rpm/tmp

+ LANG=C

+ export LANG

...(Lines snipped)...

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/chris/rpm/tmp/CriticalMass-root

Wrote: /home/chris/rpm/RPMS/CriticalMass-1.0.0-2.src.rpm

Wrote: /home/chris/rpm/RPMS/CriticalMass-1.0.0-2.i386.rpm

Wrote: /home/chris/rpm/RPMS/CriticalMass-debuginfo-1.0.0-2.i386.rpm

Executing(%clean): /bin/sh -e /home/chris/rpm/tmp/rpm-tmp.76425

+ umask 022

+ cd /home/chris/rpm/tmp

+ cd CriticalMass-1.0.0

+ rm -rf /home/chris/rpm/tmp/CriticalMass-root

+ exit 0

You'll find that rpmbuild created three RPM packages and placed them in ~/rpm/RPMS/ :

CriticalMass-1.0.0-2.i386.rpm

The binary RPM, ready to be installed and used.

CriticalMass-debuginfo-1.0.0-2.i386.rpm

Debugging info (from the /usr/lib/debug directory mentioned earlier). This package is rarely used, except by developers.

CriticalMass-1.0.0-2.src.rpm

A source RPM, which contains the source tarball and spec file. You can use this source RPM to easily generate a new binary RPM for a different type of system (see Lab 5.8, 'Rebuilding an RPM Package for a Different Architecture ').

The binary RPM the most useful package, if you just want to play the gamecan be installed like any other RPM package:

# rpm -i CriticalMass-1.0.0- 2.i386.rpm

You can also query it like any other package:

# rpm -qi CriticalMass

Name : CriticalMass Relocations: (not relocatable)

Version : 1.0.0 Vendor: Chris Tyler

Release : 2 Build Date: Mon 07 Nov 2005 11:59:11 PM EST

Install Date: Tue 08 Nov 2005 12:07:00 AM EST Build Host:bluesky.fedorabook.com

Group : Amusements/Games Source RPM: CriticalMass-1.0.0-2.src.rpm

Size : 4474014 License: GPL

Signature : (none)

Packager : Chris Tyler

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

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

Description :

CriticalMass is an old-style arcade-style shoot-em-up game with

modern graphics and sound.

# rpm -ql CriticalMass

/usr/bin/Packer

/usr/bin/critter

/usr/share/Critical_Mass

/usr/share/Critical_Mass/lg-criti.xm

/usr/share/Critical_Mass/resource.dat

/usr/share/doc/CriticalMass-1.0.0

/usr/share/doc/CriticalMass-1.0.0/COPYING

/usr/share/doc/CriticalMass-1.0.0/TODO

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

And, of course, you can remove it easily:

# rpm -e CriticalMass

When you are certain that your RPM package is in good shape, you can digitally sign it:

$ rpm --addsign CriticalMass-1.0.0- 2.i386.rpm

Enter pass phrase:

 seeecret

Pass phrase is good.

CriticalMass-1.0.0-2.i386.rpm:

5.7.2. How Does It Work?

The default macro definitions for the RPM system are merged from several files when either rpm or rpmbuild starts:

/usr/lib/rpm/macros

Standard definitions distributed with the RPM software.

/etc/rpm/macros

Site-specific macros. Definitions that are local to your system and that should apply to all users should be

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

0

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

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