Linux Cookbook [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Cookbook [Electronic resources] - نسخه متنی

Carla Schroder

نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
تنظیمات قلم


اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
لیست موضوعات
افزودن یادداشت
افزودن یادداشت جدید

Recipe 2.11. Installing Source RPMs

2.11.1 Problem

You can't install
an RPM because of binary incompatibilities with your system, or you
just prefer to compile applications on your system, or you want to
edit the source code then build the package.

2.11.2 Solution

Build your new program from source RPMs.

Download the SRPMin this example,
tuxpaint-2002.10.20-1.src.rpminto your
directory of choice. Be sure to get the SRPM for your Linux

Then run the package installer:

# rpm -ivh tuxpaint-2002.10.20-1.src.rpm

This will place sources in /usr/src/SOURCES and
the spec file in

$ ls /usr/src/SOURCES
tuxpaint-2002.09.29.tar.gz ruxpaint-Makefile.patch tuxpaint-stamps-2002.09.29.tar.gz
tuxpaint.desktop tuxpaint-opt.patch

$ ls /usr/src/SPECS

Build the spec file:

# rpmbuild -bb tuxpaint.spec

This creates a new RPM in /usr/src/RPMS/i386:

# ls /usr/src/RPMS/i386

You now have a nice, new Tuxpaint RPM, compiled for your system.

2.11.3 Discussion

The source directory on your particular distribution may be
different. Fedora 1 uses /usr/src/redhat/RPMS/,
as did some early versions of Mandrake. Other
distributions use /usr/src/RPM/RPMS. Poke around
and you'll find the right one.

This is not an escape from RPM hell. It simply lets you build an RPM
from sources compiled on your system, so you have binary
compatibility with system libraries and the RPM is optimized for your
architecture. You still need to manually satisfy dependencies, which
is not as much fun as it sounds.

Note that rpmbuild is a separate package from

2.11.4 See Also

/ 435