C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Build-Time Scripts: Unchanged For Subpackages
 

Build-Time Scripts: Unchanged For Subpackages

%prep, %build, and %install scripts in any spec file.

doing whatever is required to get the all the software unpacked, built, and installed. For example, if packaging client/server software, the software for both the client and the server must be unpacked, and then both the client and server binaries must be built and installed.

Our Spec File: One Last Look…

Let's add some build-time scripts and take a final look at the spec file:
 of the foo app, and the baz library needed to
build it...

%package server
Summary: The foo server
Group: bogus/junque
%description server
This is the long description for the foo server...

%package client
Summary: The foo client
Group: bogus/junque
%description client
This is the long description for the foo client...

%package -n bazlib
Version: 5.6
Summary: The baz library
Group: bogus/junque
%description -n bazlib
This is the long description for the bazlib...

%prep
%setup

%build
make

%install
make install

%pre
echo "This is the foo package preinstall script"

%pre server
echo "This is the foo-server subpackage preinstall script"

#%pre client
#echo "This is the foo-client subpackage preinstall script"

%pre -n bazlib
echo "This is the bazlib subpackage preinstall script"

%files
/usr/local/foo-file

%files server
/usr/local/server-file

%files client
/usr/local/client-file

%files -n bazlib
/usr/local/bazlib-file
          

As you can see, the build-time scripts are about as simple as they can be. [1]

Notes

[1]

This is the advantage to making up an example. A more real-world spec file would undoubtedly have more interesting scripts.

Главная